February 11, 2008

How many types to create New Table

Q: Throught script to create table?
A: CREATE TABLE Tablename
(
ColumnName1 DATATYPE,
ColumnName2 DATATYPE,
..........
)
Q: Create Table from Existing Table with data ?
A: SELECT * INTO New_ TableName FROM Exists_TableName

Q: Create Table from Existing Table without data ?
A: SELECT * INTO New_TableName FROM Existing_Tablename where 1=2

No comments:

Post a Comment