Skip to content

DBAzine.com

Sections
Personal tools
Seeking new owner for this high-traffic DBAzine.com site.
Tap into the potential of this DBA community to expand your business! Interested? Contact us today.
Who Are You?
I am a:
Mainframe True Believer
Distributed Fast-tracker

[ Results | Polls ]
Votes : 3559
 

Comment

Above in this comment thread: Implementing Identity Columns in SQL Server » How do I handle situations like this?

Best Practices

Posted by mougue at 2006-02-14 09:38 PM
Hi,
The best practice is to always specify a column list when you can. If you can't or for some reason to design a solution where you won't know the composition of the columns, you can use a SELECT INTO statement in order to create a table which has the results of your select statement. This usually means that there cannot be an existing table with a differet sent of data and that the table created by the SELECT INTO will be the only one that can exist with the specified set of data, unless you run subsequent insert statements.

Hope this helps.
 
Transaction Management
Reduce downtime and increase repeat sales by improving end-user experience.
Free White Paper
Database Recovery
Feeling the increased demands on data protection and storage requirements?
Download Free Report!
 
 

Powered by Plone