Subject | Creating unique column entries |
---|---|
Author | Laurent Duperval |
Post date | 2004-09-27T19:56:03Z |
Hi,
I'm not sure this is even a Jaybird question. I'm using Firebird 1.5 on
Windows. I created a talble like this:
CREATE TABLE Vehicle
(
Id char(10),
Name varchar(32) NOT NULL unique,
CONSTRAINT PK_Vehicle PRIMARY KEY (Id)
);
I want to make sure that no two vehicles have the same name. However,
the followin does not cause an exception:
statement.execute("insert into vehicle values('1', 'Foo')");
statement.execute("insert into vehicle values('2', 'Foo')");
Any ideas why?
Thanks,
L
I'm not sure this is even a Jaybird question. I'm using Firebird 1.5 on
Windows. I created a talble like this:
CREATE TABLE Vehicle
(
Id char(10),
Name varchar(32) NOT NULL unique,
CONSTRAINT PK_Vehicle PRIMARY KEY (Id)
);
I want to make sure that no two vehicles have the same name. However,
the followin does not cause an exception:
statement.execute("insert into vehicle values('1', 'Foo')");
statement.execute("insert into vehicle values('2', 'Foo')");
Any ideas why?
Thanks,
L