Hallo
Ik ben in een bedrijf wat aanpassingen aan het uitvoeren op een antieke MSSQL 6.5 database. Nu moet ik wat columns toevoegen aan een tabel. Geen probleem. Maar zo gauw ik het BIT datatype gebruik komt daar verandering in
of
ALTER TABLE only allows columns to be added which can contain nulls. Column 'definitief' cannot be added to table 'taxaties' because it does not allow nulls.
Dus dan maar
Column or parameter #1: -- can't specify Null values on a column of type BIT.
grrr
De standaard syntax werkt hier dus niet. Ik kan het niet testen maar volgens mij werkt het wel op hogere versies. Toch staat hier :
http://msdn.microsoft.com...lref/ts_sp_da-di_5c8c.asp
"bit columns created without an explicit NULL or NOT NULL option in CREATE TABLE or ALTER TABLE are created as NOT NULL". Het moet dus kunnen. Let wel, het woord "column" mag je niet gebruiken in 6.5
Ik ben in een bedrijf wat aanpassingen aan het uitvoeren op een antieke MSSQL 6.5 database. Nu moet ik wat columns toevoegen aan een tabel. Geen probleem. Maar zo gauw ik het BIT datatype gebruik komt daar verandering in
code:
1
| ALTER table taxaties ADD definitief BIT |
of
code:
1
| ALTER table taxaties ADD definitief BIT not null |
ALTER TABLE only allows columns to be added which can contain nulls. Column 'definitief' cannot be added to table 'taxaties' because it does not allow nulls.
Dus dan maar
code:
1
| ALTER table taxaties ADD definitief BIT null |
Column or parameter #1: -- can't specify Null values on a column of type BIT.
grrr
De standaard syntax werkt hier dus niet. Ik kan het niet testen maar volgens mij werkt het wel op hogere versies. Toch staat hier :
http://msdn.microsoft.com...lref/ts_sp_da-di_5c8c.asp
"bit columns created without an explicit NULL or NOT NULL option in CREATE TABLE or ALTER TABLE are created as NOT NULL". Het moet dus kunnen. Let wel, het woord "column" mag je niet gebruiken in 6.5