tsql - SQL Server : how to move NOT NULL column(with its data) to another table? -


i have many many relation, want change 1 many relation.

  • table has 2 fks dropped.
  • one of fks in table moved table b.
  • fks not nullable.

my approach far this:

  1. add nullable column(fk) table b as.

  2. insert data table b table a.

  3. alter column not null.

now question:

  • can achieve without step 1?
  • is there "better" approach?

i see marc_s has mentioned in comment, people viewing question in future i'll again here.

there no way in current version of sql server. if there shortcut, nothing more "syntactic sugar," say, you're talking about.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -