You should define the column list in the SELECT statement for a number of reasons.
Performance - Defining the list up front means SQL Server doesn't have to work it out.
Reliability - Defining the list up front gives your stored procedure a consistent interface to the outside world. If you add or rearrange columns the stored procedure's output will remain the same - which means that the application using it will continue to work. If the changes are breaking changes then the point it breaks will be in the stored procedure which is closer to the change than anywhere else. This means it should be easy to find the dependencies and fix the remaining code.
Please will someone advise me on a resource that nicely explains security using Management Studio. I need to grant a permission to the database owner, but dbo isn't a real user, so how can I grant the permission? The user is linked to login 'sa'.
I want to keep my database secure by backened. Actually i donot want to let anybody to make any modification in my database(Sql Server2000) through Enterprises Manager and also only the authorised users can have accesss to the database through frontened(ASP.NET)
Actually i donot want to let anybody to make any modification in my database(Sql Server2000) through Enterprises Manager
Not gonna happen.
Enterprise manager can connect to the database using any account that has been set up. (Typically it will connect as sa [the sys admin]). If you have any kind of access to the database from an application, Enterprise Manager will be able to connect using the same credentials.
I'm busy musing over the best way to deploy a CLR stored procedure. Where do I put it before pulling the assembly into the database? Do I use a normal setup routine to an install folder and then invoke my deployment scripts using the code-base in that folder?
A: (ID Col1 Col2)
B: (ID Col3)
I want to move col2 from A to B.
Hence I have added a new column in table B, say col4.
I want an update statement that will transfer A.col2 to B.Col4.