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:
add nullable column(fk) table b as.
insert data table b table a.
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
Post a Comment