Discussion:
Alter table
(too old to reply)
William Orova
2003-09-03 18:33:41 UTC
Permalink
Yes:
Is there any way to alter all of the columns in a table to be set to
accept nulls, and then reverse this procedure? Without 200 alter table
statements?

Bill Orova



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Partha Mandayam
2003-09-03 18:51:51 UTC
Permalink
Just script the table using Enterprise mananger and replace all NULL by not
null and vice versa.
Post by William Orova
Is there any way to alter all of the columns in a table to be set to
accept nulls, and then reverse this procedure? Without 200 alter table
statements?
Bill Orova
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jens Süßmeyer
2003-09-03 19:57:46 UTC
Permalink
Two ways, EM or TSQL.

Jens Süßmeyer.
"William Orova" <***@ibx.com> schrieb im Newsbeitrag news:***@tk2msftngp13.phx.gbl...
Interesting but this has to be accomplished within a SP





Bill



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
William Orova
2003-09-03 20:34:26 UTC
Permalink
Dear:Jens S��meyer

please send both ways


Bill



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
William Orova
2003-09-03 20:34:26 UTC
Permalink
Dear : Anders Vindal Eriksen
Thank you'
I thought so, I was wondering if you could use the set
ansi_null_dflt_on/off to change the nullability of any column that is
not specified in the original create table statement inside of a SP??
say to set the nulls on for the beginning then set back to off or
default at the end of the SP??


thanx much

Bill




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Robert Taylor
2003-09-03 22:54:47 UTC
Permalink
Anders,

By default, yes the DROP statement is created. But this can also be
turned off in the options.

Robert


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Robert Taylor
2003-09-04 16:15:04 UTC
Permalink
Anders,

After you have selected "Generate SQL Script", click on the Formatting
tab. Second item is "Generate the drop <object> command for each
object". Clear this option.

HTH,

Robert

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Continue reading on narkive:
Loading...