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 are the different types of replication you can set up in sql server?
How to create a view with data from multiple tables?
What is the fastest way to permanently delete a 1 million row table named customers?
How to use transact-sql statements to access the database engine?
Why can there be only one clustered index and not more than one?
How many types of indexes are there in SQL Server?
6 Answers CarrizalSoft Technologies, United Healthcare,
Explain raiserror in sql server?
find the 3rd max salary
application server is slow what may be the problem
How to Generate a Series of Random Integers With T-SQL?
You want to implement the many-to-many relationship while designing tables. How would you do it?
How do I change my passwords (database, LDAP, and so on) without causing an outage?
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)