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

What is database sql?

707


how many sql ddl commands are supported by 'mysql'? : Sql dba

701


how to drop an existing view in mysql? : Sql dba

792


Can we enter data in a table in design view?

713


What is data profiling in sql?

739






Why is there a need for sqlcode and sqlerrm variables?

756


What are different types of statements supported by sql?

817


What is example of database?

699


What are the types of index in sql?

771


What is the difference between nvl function, ifnull function, and isnull function?

796


Does varchar need length?

712


What is bulk compiling in pl/sql.?

798


what is row? : Sql dba

930


Explain the update statement in sql

731


Is delete faster than truncate?

749