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 |
Do you know query execution plan?
What are rows and columns?
Why we are using the sql language?. What is the purpose of using this?
What is the difference between IN and EXISTS operators in SQL Server?
9 Answers ASD Lab, CSC, Intelligroup,
What purpose does the model database server?
Explain what are the restrictions that views have to follow? : SQL Server Architecture
How to delete database objects with "drop" statements in ms sql server?
Explain syntax for disabling triggers?
How many columns can we include on clustered index ?
Suppose i have one sql query that contains 2 minute to execute.After one weekly i am executing same query that is taking 5 minute.Why our same query is taking more time.what would be my approach to reduce execution time.Please help.
1 Answers Cognizant, HCL, Value Labs,
What is the difference between a local and a global variable?
What are different types of data sources?
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)