|
Posted by Shwetabh on 02/14/06 12:44
David Portas wrote:
> 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
> --
But the problem is that this database has to be accessed by a third
party
application which will need to access the required data using Partnum
as
keyword. In such scenario, it becomes neccessary to use select * from
....
to get the row. How can I help it in such a case?
Also, will it be inefficient to use select * from .. if we have to
retrieve just 1
record or is it inefficient if more records have to be retrieved?
Navigation:
[Reply to this message]
|