How can I create a table from another table without copying any values from the old table?
Answer Posted / amit kumar sharma
Select * into newTable From oldTable where 1=2
The where condition 1=2 will never get true, so only the
column of table will appear and get copied to newTable.
If we remove the where condition table with data will copy
to newtable.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?
where the connection string store in the database
How to check status of stored procedure in sql server?
Why truncate is ddl?
What is a data source file?
What is the federation in sql azure?
How to get a list all databases on the sql server?
Explain the truncate command?
What is best institute to Learn DotNET And SQL in chennai?
Explain log shipping and mention its advantages.
Are resultset updatable?
Can we hide the definition of a stored procedure from a use?
What do you do in data exploration
How to get all stored procedures in sql server?
What are the built in functions in sql server?