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 pl sql script?

1026


How do you delete data from a table?

1019


What are the different types of functions in sql?

1046


what is try_catch block in procedure

1733


Differentiate between pl/sql and sql?

1143


What are the triggers associated with image items?

1034


How do I install microsoft sql?

1043


What are tuples in sql?

1123


What does the hierarchical profiler does?

1054


tell us something about heap tables. : Sql dba

1091


Where the sql database files are stored?

1010


What is sqlservr exe?

973


What is t-sql? : Transact sql

980


How can you select unique records from a table?

1069


What sql does db2 use?

971