M
Michael
I am using a normal SQL script for creating a table :
CREATE TABLE sample (
id int NOT NULL,
value1 int NOT NULL DEFAULT 0,
value2 varchar(50) NULL,
PRIMARY KEY(id)
)
This statement works for MSSQL, but it doesn't work for msaccess :
"Error: [Microsoft][ODBC Microsoft Access Driver] Syntaxerror in
Fielddefinition."
I want to set two things :
- the column "value1" should have a default value (0), so you don't need it
in the insert-statement
- the column "value2" should also accept "empty strings" (like '')
i know you can set this option in msaccess, but can you do it here ?
Does anyone know how to do this right ?
Thanks for help,
Michael
CREATE TABLE sample (
id int NOT NULL,
value1 int NOT NULL DEFAULT 0,
value2 varchar(50) NULL,
PRIMARY KEY(id)
)
This statement works for MSSQL, but it doesn't work for msaccess :
"Error: [Microsoft][ODBC Microsoft Access Driver] Syntaxerror in
Fielddefinition."
I want to set two things :
- the column "value1" should have a default value (0), so you don't need it
in the insert-statement
- the column "value2" should also accept "empty strings" (like '')
i know you can set this option in msaccess, but can you do it here ?
Does anyone know how to do this right ?
Thanks for help,
Michael