SQL Server Performance

Error while Table alter

Discussion in 'General Developer Questions' started by SQL DBA, May 21, 2008.

  1. SQL DBA New Member

    Hi,
    ALTER TABLE table 1
    ADD column1 money NUlL DEFAULT '0',
    column2 int NUlL DEFAULT '0',
    column3 money NUlL DEFAULT '0'
    while running this i am getting the below error, Please help
    Server: Msg 257, Level 16, State 3, Line 1
    Implicit conversion from data type varchar to money is not allowed. Use the CONVERT function to run this query.
    Server: Msg 1750, Level 16, State 1, Line 1
    Could not create constraint. See previous errors.
  2. Adriaan New Member

    You're specifying an string value as the default for a column of the money data type, which is not allowed. Drop the single quotes in the default constraint.
  3. SQL DBA New Member

    Thank you, this is working fine by dropping the quotes
  4. FrankKalis Moderator

    This scripts runs here without the error. Is this the full script you''re running?

Share This Page