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

Posted by Shwetabh on 02/16/06 06:43

David Portas wrote:
> Shwetabh wrote:
> >
> > 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?
>
> Why would it be necessary to use SELECT * in such a scenario? SELECT *
> is slow because it requires extra work by the server to retrieve the
> column metadata. It's unreliable because more code may break if and
> when the table structure changes. It's hard to maintain because you
> can't easily search for column dependencies in your code during
> development.
>
> In another post you stated your application was VB so you should be
> able to create a stored procedure and call that from your VB code.
> Again, it's poor practice to put SQL code directly into applications if
> you can possibly avoid it.
>
> --
> 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
> --

I understand what you are saying. But consider this scenario:
A user needs a few more fields in the database and adds them to a table
kept for the purpose. Now how can _those_ fields be accessed without
using select *?

 

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

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