-5

For Highly Optmized Select Query, Is it better to go with View or Stored Procedure in SQL Server

user1030181
  • 1,995
  • 5
  • 26
  • 56
  • 2
    Views are more useful because they can be used in queries. No, wait, stored procedures are more useful because you can include other code. Neither is "better". They have different uses. – Gordon Linoff Jan 29 '15 at 04:44
  • please look at [Stored Procedures Vs. Views](http://stackoverflow.com/questions/3773277/stored-procedures-vs-views) and [What is the difference between a stored procedure and a view?](http://stackoverflow.com/questions/5194995/what-is-the-difference-between-a-stored-procedure-and-a-view). – Alex Vazhev Jan 29 '15 at 04:44
  • 1
    Definitely View for `SELECT` **without variable**. – Jun Rikson Jan 29 '15 at 04:47

1 Answers1

0

Definitely View for SELECT without variable. If you need a criteria from variable, you can call a view inside stored procedure. Or maybe simply depends to what you need.

Jun Rikson
  • 1,964
  • 1
  • 22
  • 43