RSS

Tag Archives: duplicating table with primarykey

Create exact copy of table


Create the existing table’s copy we normally use

Create table <new table> select * from  <existing table>

it works. but it couldn’t create primary key defined in existing table.

To solve this problem use this following query:

Create table <new table>  like <existing table>;

 
Leave a comment

Posted by on October 15, 2011 in Uncategorized

 

Tags: , ,

 
%d bloggers like this: