Groups | Blog | Home
all groups > sql server programming > june 2006 >

sql server programming : SELECT * in SQL 2005



David Portas
6/2/2006 2:38:35 PM
[quoted text, click to view]

That's not true. However, SELECT * should not be used in production
code. To do so is careless and inefficient and it makes your code
unreliable and hard to maintain. The same is true whatever the version
though - there are no special considerations for 2005.

You may be confusing SELECT * with the legacy *= / =* notation. In 2005
that is only supported when the compatibility level is set to 80 or
lower. You should plan to replace the old syntax with the ANSI OUTER
JOIN syntax.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Tom Moreau
6/2/2006 5:34:21 PM
No.

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
..
[quoted text, click to view]
Hi

Just a quick question, we are thinking of moving to SQL 2005 and I heard
somewhere that SELECT *, is not supported in SQL 2005, is this true?

Kind Regards

Ricky

Steve Kass
6/2/2006 5:36:21 PM
It is, and will almost certainly always be, supported, since it is
standard SQL. Nevertheless, it is not recommended for code
used in production, excepting in situations like EXISTS clauses,
where a column list does not mean anything different.

Steve Kass
Drew University

[quoted text, click to view]
Ricky
6/2/2006 10:25:23 PM
Hi

Just a quick question, we are thinking of moving to SQL 2005 and I heard
somewhere that SELECT *, is not supported in SQL 2005, is this true?

Kind Regards

Ricky

AddThis Social Bookmark Button