Add not null

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ather Rehan
    New Member
    • Aug 2011
    • 1

    #1

    Add not null

    I have problem at time of altering the table to not null.
    the syntax I am using is

    ALTER TABLE table_name MODIFY column_name NOT NULL

    the error is
    Msg 102, Level 15, State 1, Line 1
    Incorrect syntax near 'MODIFY'.
  • Dody
    New Member
    • Aug 2011
    • 11

    #2
    to modify column structure user Alter column not modify

    try this line

    Code:
    ALTER TABLE table_name 
    Alter column column_name column_type NOT NULL

    Comment

    Working...