Posted by David Portas on 09/09/05 18:58
CREATE TABLE newtable (col1 INTEGER, col2 ... etc ... , CONSTRAINT pk_newtable PRIMARY KEY (col1, col2)) ; INSERT INTO newtable (col1, col2, ...) SELECT col1, col2, ... FROM oldtable ; Also, take a look at the ALTER TABLE ... ADD CONSTRAINT syntax in Books Online. -- David Portas SQL Server MVP --
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming