Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / saurabh agrawal

We can only copy the structure of the table and not the
constraints.
Syntax is as below:
Create table newtablename as select * from oldtablename;

In this way only NOT NULL constraint specified on any
column of the OLDTABLE will automatically get copied into
the NEWTABLE but other constraint will have to be created
manually.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is auto increment in sql?

1060


How can we optimize a sql query?

982


What is sp_helptext?

1004


What happens when a trigger is associated to a view?

837


The in operator may be used if you know the exact value you want to return for at least one of the columns.

1023


Which operator is used in query for pattern matching?

1031


What is a constraint?

959


What is procedure in pl sql?

976


What is the difference between the sql*loader and import utilities? : aql loader

973


Is id a reserved word in sql?

1088


What does count (*) mean in sql?

1514


how to analyze tables with 'mysqlcheck'? : Sql dba

954


What is rowtype?

953


Explain the difference between triggers and constraints?

919


What is sql*loader and what is it used for?

1042