Can you define a NULL on a column definition in the Create Table statement in a Firebird DB?
-
04-10-2020 - |
Pregunta
I am using SQL Manager Lite to try to run a DDL Create Table script. I am new to Firebird and I don't know why it isn't working. The following script...
create table Contacts (
ID integer not null,
FirstName varchar(64) not null,
LastName varchar(64) not null,
MiddleInitial varchar(1) null
);
Is causing a parsing error (UNIDENTIFIED TOKEN) on the null constraint for the MiddleInitial column.
Here is the exact error returned by Sql Lite...
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 5, column 52.
Null.
Is the NULL constraint not allowed in Create Table DDL for firebird?
Solución
not sure if ti works as I can't test it right now but try removing null
from the sentence:
CREATE TABLE Contacts(
Id integer not null,
First_Name varchar(64) not null,
Last_Name varchar(64) not null,
Middle_Initial varchar(1)
);
See this link: Firebird Wiki
Otros consejos
Null is not allowed butr by default it's null
You can take a look at this grammar
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow