How create table structure only from tableA to TableB if
TableA have some data?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of the relational tables?

486


When cursors are useful?

573


What is an example of a primary key?

502


Explain what are page splits? : SQL Server Architecture

649


How to enforce security in sql server? : sql server security

619






What is a domain constraint give an example?

558


Can we update data in a view?

596


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

704


How to make a remote connection in a database?

529


What are the commands used in DCL?

553


What are system databases into sql server (2005/2008) : sql server database administration

563


What are different types of replication in sql server?

566


How to retrieve error messages using odbc_errormsg()?

535


How to delete exactly duplicate records from a table?

597


Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

509