This is a discussion on modifying a column in the table within the SQL Server 2005 Tutorials forums, part of the Articles and Tutorials category; Hi, I would like to add new fields(column) in the already existing table in SQL server mangement studio.2005 When I ...
|
|||||||
| SQL Server 2005 Tutorials SQL Server 2005 Tutorials and Articles discussions |
![]() |
| LinkBack | Thread Tools | Search this Thread |
|
|||
|
modifying a column in the table
Hi,
I would like to add new fields(column) in the already existing table in SQL server mangement studio.2005 When I added the needed fields,I want to use the check constraint to check the 2 fields namely PROD_STATUS char(10) IN or OUT ANAL_FLAG char(10) YES or NO it should have only the above mentioned values in the table.So could any please let me know how to proceed on the same as I am getting the error as follows: 'SYS_200812' table - Unable to modify table. Cannot insert the value NULL into column 'PROD_STATUS', table 'AS.dbo.Tmp_SYS_200812'; column does not allow nulls. INSERT fails. The statement has been terminated. 'SYS_200812' table - Unable to modify table. ALTER TABLE only allows columns to be added that can contain nulls, or have a DEFAULT definition specified, or the column being added is an identity or timestamp column, or alternatively if none of the previous conditions are satisfied the table must be empty to allow addition of this column. Column 'PROD_STATUS' cannot be added to non-empty table 'SYS_200812' because it does not satisfy these conditions. |
| Sponsored Links |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| General Ledger – Technical | dongta_ndh | Oracle Apps | 1 | 09-10-2009 07:34 AM |
| Import EXCEL Data into QTP Global Data Table | venkata krishnamurthy t | Software Testing | 7 | 12-09-2007 11:59 PM |
| Want to change the datatype of the column | siri6589 | Oracle Database | 2 | 04-22-2007 12:44 PM |
| SQL Server FAQ | Limca | SQL Server | 1 | 04-27-2006 06:25 PM |
| [FAQ] FileMaker Pro - database for Macintosh and Windows | Martin Trautmann | Tech FAQ | 0 | 04-17-2004 08:26 AM |