You are here: table copy misses indexes « MsSQL Server « IT news, forums, messages
table copy misses indexes

Posted by Johnny Ruin on 09/09/05 18:50

Hi,

I simply want to create a duplicate of an existing table with a
different name. I've tried the "select * into newtable from
orgtable", which works great, except that it doesn't mark the primary
key field from orgtable in the newtable. I tried creating the
newtable prior to using this select, but then sql server cries about
the table already existing. I tried creating the index after the
select "CREATE UNIQUE INDEX FieldAIndex ON newtable (FieldA)" - that
didn't give a error, but also failed to mark the field as primary.
Suggestions?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация