renaming tables sql server, cascading change by pk fk's


i wish sql management something where i have list named tblfoo i wish name tblfoobar. however, i wish primary pivotal also change, example, now is:



constraint [pk_tblfoo] primary pivotal clustered 


and i wish name change change to:



constraint [pk_tblfoobar] primary pivotal clustered 


then, recursively by cascade change tables have foreigh pivotal relationship, eg. this:



check supplement  imprisonment [fk_tblcontent_tblfoo] unfamiliar key([fooid])


to this:



 check supplement  imprisonment [fk_tblcontent_tblfoobar] unfamiliar key([fooid])


naturally, i am perplexing by manually since a) an blunder likely process, b)it doesn't scale.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members