April 20, 2004 at 1:22 pm
Tried searching for a script for the best way to update isnullable and default values for all columns of a given data type but couldn't find one. I have some decimal and money fields that currently allow nulls and do not specify a default value. I would like script the altering of all of these fields to not allow nulls and set the default value to '0.0' or '0'.
TIA,
Scott
April 20, 2004 at 2:24 pm
Enterprise Manager can create this script for you.
Goodluck,
Pete
April 20, 2004 at 2:40 pm
Well, Pete's recommendation (thanks for the reply) did work for generating a rather large and complex script that would work specifically for the Table and all of its dependents (keys, constraints, etc.). But I'm no SQL expert and I doubt I could modify this script to the generalized level to operate on all tables in the db.
Any chance someone out there has a general script that would work for all tables (including their constraints, keys, etc.) in a given db?
TIA,
Scott
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply