Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Does someone know this one?

Author  Topic 

elebetsamer
Starting Member

12 Posts

Posted - 2001-09-25 : 15:16:10
Is the first SQL statement gonna take up more time and server resources then the second statement? The reason I am asking is because of this, I have a need for dynamic SQL. So I have 2 choices, I can build a dynamic string then use "exec()" or I can use regular SQL and use the Coalesce() function. So I wanted to know if because the variable that will be the first parameter of the Coalesce function is blank then it will basically do this "where field = field". Any light that you can shed on this for me will be a great help, thanks.

1.
Select * From Table Where tableID = tableID

2.
Select * From Table

   

- Advertisement -