ALTER TABLE with NULL allowed SQL incorrect

Sybase - related issues
Post Reply
aschild
Posts: 20
Joined: Fri Apr 19, 2013 12:06 pm

ALTER TABLE with NULL allowed SQL incorrect

Post by aschild » Thu May 16, 2013 10:30 am

SQL Aynwhere 10:

When I modify my table schema by adding a new new colum which allows NULL values and then generate the SQL code to make the DB modifications I receive this:

ALTER TABLE DBA.ADDRESS ADD PhoneB char(12);

where as the correct code would be:

ALTER TABLE DBA.ADDRESS ADD PhoneB char(12) NULL;

When I don't allow null values for a column, then the correct code is generated:

ALTER TABLE DBA.ADDRESS ADD PhoneB char(12) NOT NULL;


André

peleus
Posts: 54
Joined: Fri Nov 09, 2012 3:43 pm

Re: ALTER TABLE with NULL allowed SQL incorrect

Post by peleus » Fri Jun 07, 2013 4:28 pm

Hi buddy, I would strongly suggest to create a support ticket on this. It may need to be duplicated or something similar.

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: ALTER TABLE with NULL allowed SQL incorrect

Post by donose.mihai » Tue Jun 18, 2013 10:15 am

A ticket has been added, also you can look into the Database settings -> statement, you can modify the statement manually in order to fix it.

Post Reply