Syntax for using ALTER...ALTER COLUMN... 
Author Message
 Syntax for using ALTER...ALTER COLUMN...
I have a problem setting primary key and null value to my SQL database that
have been migrated from Access. All the primary key are removed during the
migration.

I was trying to write a procedure to programmatically set primary key and
remove AllowNull Value for each field (that have ID at the end of field
name)in the table using ALTER TABLE TABLE_NAME ALTER COLUMN ... but did not
get any success (maybe due to I am not writing the correct statement. Could
anyone suggest something on this

SAM



Mon, 29 Jul 2002 03:00:00 GMT
 Syntax for using ALTER...ALTER COLUMN...

AFAIK there is no ALTER COLUMN part of ALTER TABLE, just {ADD | DROP} COLUMN
That means that you must move the data, drop the column, re-create the
column.

--
Regards,
Bas Cost Budde
soon resigning not from nospam but wegener

Management Information System wrote

Quote:
>I was trying [...] using ALTER TABLE TABLE_NAME ALTER COLUMN ... but did
not
>get any success (maybe due to I am not writing the correct statement.



Mon, 29 Jul 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Alter Table Alter Column Syntax

2. Alter table alter column syntax

3. syntax for ALTER TABLE ALTER COLUMN DEFAULT

4. multiple ALTER COLUMNs in one ALTER TABLE statement?

5. Help with Alter Table Alter Column

6. Alter table alter column

7. alter table alter column

8. Alter table Alter column problem.

9. ALTER TABLE ... ALTER COLUMN IDENTITY

10. ALTER TABLE ALTER COLUMN

11. ALTER TABLE ALTER COLUMN to set Default

12. Alter table alter column text


 
Powered by phpBB® Forum Software