Could someone chime in as to whats a better practice? for select queries should I return all or the IDs that I require?
Efficiency? Scalability? etc.
thanks
Env: SQL Server 2008, VS2008 (VB)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use select col1, col2, col3 from table instead of select * from table1. This has numerous advantages, as mentioned here and here.
Also see:
http://weblogs.sqlteam.com/jeffs/jeffs/archive/2007/07/26/60271.aspx
Is there a difference between Select * and Select [list each col]