You are here: Re: Select command with multiple tables « MsSQL Server « IT news, forums, messages
Re: Select command with multiple tables

Posted by David Portas on 02/14/06 12:37

Shwetabh wrote:
>
> That's one way of doing it. But since i am using more than two tables,
> it becomes difficult to write each and every field in the query. Is
> there
> any query like "Select * from ..." which can do the job?

Certainly you can use SELECT * but putting SELECT * in production code
is sloppy, inefficient and in the longer term can prove unreliable and
costly to maintain. Best practice is to list all the column names.

If you want to save some typing then use the Object Browser in Query
Analyzer or Management Studio. You can click and drag the column list
into your queries with no typing required.

--
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
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация