Hi,<BR><BR>I was wondering whether to set up a simple SELECT query as a stored procedure or as a view in SQL Server 2000 - does it really make any difference which I choose?<BR><BR>Thanks,<BR><BR>JON
stored procedures are the things made to execute queries. They are already compiled.<BR><BR>
Does not usually make much difference. Tho technically a view designed for this. I assume you are joining 2 or more tables?
If you are passing parameters then it needs to reexecute each time
the execution path of the sql has already been defined once.<BR><BR>And if the table is indexed properly, it hardly takes anything to get the row(s).
Yes, I am joining tables, but I also have some single table SELECT queries that COULD be views too - would there be any point?
I believe for a newbie that views are an easier concept and more easily changed. ( adding columns etc... )
No point in views on a single table select just limit the number of columns to the one's you want explictly.
learn the right thing the first time.<BR><BR>Stored Procedures are the right place to write the SQL statements.<BR><BR>If tomorrow someone wants to write some transactional sqls, then how would you handle that by views??<BR>
So what you are saying is to avoid using views!<BR>Shock horror!