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
what is the difference between delete table and truncate table commands? : Sql server database administration
How to add more data to the testing table in ms sql server?
How to create sub reports?
What is a dataset and what are the different types of datasets?
Write a program to fetch first 10 records from a file?
How do I start sql server agent automatically?
What it means to be triggered?
How to disable a login name in ms sql server?
How to generate create view script on an existing view?
List down some advantages of sql stored procedure?
Explain filestream storage of sql server 2008?
Explain the xml support sql server extends?
Explain in details security in SQL azure?
1.what is the diff between nolock optimizer and read uncommitted isolation? 2.what is the diff between revoke and deny? 3.what is percieved down time? 4.whether password protection are required for backups?if yes why?if no why? 5.what is fill factor? 6.what is cost analysis? 7.what is mean by piece meal restore? 8.what is 'rowguidcol'? 9.impersonate permission? 10.what is selectivity?
What do we need queues in sql service broker?