How create table structure only from tableA to TableB if
TableA have some data?
Answers were Sorted based on User's Feedback
Answer / sunny
to copy only the structure
select * into table2 from table1 where 1=2
to copy the table along with the records
select * into table2 from table1 where 1=1
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / karthik
Create table emp1
as
select * from emp
where 1=2
It will give the structure of the table.
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / mits
Create table newtablename
from oldtablename
where 1=2
| Is This Answer Correct ? | 4 Yes | 6 No |
What is the syntax for encrypting a column in SQL Server?
what are constraints? : Sql server database administration
How to create a simple stored procedure in ms sql server?
What is the difference between primary key and unique constraints?
How to rebuild the master database?
Why do we use non clustered index?
What is a trace frag? Where do we use it?
How to return the second 5 rows in ms sql server?
i want to join two queries....and i want to run them as one after another that is want output of first query then second , then again output of first query then second and so on...
Explain the etl (extraction, transformation, and loading)?
How To Find That One Week Change in My DataBase we Have Done Like We Have A database Test I Change Table,Stored Procd. Then I Find Which SP,Table We Have Edit/Change in Seven Dayes
How many tables can be joined in SQL Server?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)