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

How do I create a sql database?

516


What are sql functions? Describe in brief different types of sql functions?

480


Explain spool.

679


how to use case expression? : Sql dba

543


what's the difference between a primary key and a unique key? : Sql dba

500






how to include character strings in sql statements? : Sql dba

544


What are the built in functions of sql?

551


What is the basic structure of an sql?

563


What is offset in sql query?

589


What are sql commands?

494


Does sap use sql?

511


Is merge a dml statement?

514


Does access use sql?

551


What is field delimiter?

627


Why is normalization important?

528