what command is used to create a table by copying the
structure of another table including constraints ?

Answer Posted / selvaraj v , anna univ coe

To Use same database :
======================

CREATE TABLE NEW_TBLNAME AS SELECT * FROM OLD_TBLNAME WHERE
1=2;


EXAMPLE :
---------
CREATE Emp_tbl2 AS SELECT * FROM Employee_Tbl1 WHERE 1=2;

Table creation From One USER To Another USER :
======================================================

COPY FROM coeot1a2/coeot1a2@coeau TO scott/tiger@server1
CREATE s11 USING SELECT * FROM major_List;

coeot1a2 ----> USER NAME
coeot1a2 ----> PASSWORD
coeau -------> SERVER NAME
scott -------> Another USER NAME
tiger -------> Another User PASSWORD
server1 -----> Another SERVER NAME

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are aggregate functions called so?

517


What is a left join?

513


What is join view in sql?

515


Explain lock escalation? : Transact sql

708


How do I remove duplicates in two columns?

510






what is self-join? : Sql dba

573


Is vs as in pl sql?

494


What is the need of a partition key?

538


Explain the difference in execution of triggers and stored procedures?

573


Can sql developer connect to db2?

587


Why do we use joins?

568


Can you skip header records while loading? : aql loader

544


What is oracle sql developer?

608


Which is faster union or join?

495


What is sp_helptext?

592