If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 2002 Jet T-SQL constraint bug
I am in a class where we are using the T-SQL capabilities
of MS Access to create and modify all database structures. I have ran into a problem that seems to be an Access bug. When I create a table using DDL constructs and designate a PRIMARY KEY constraint, I am not using the NOT NULL or UNIQUE constraint because (by MS built-in help) they are implied. But when I do this, the "allow zero length" is set on that primary key column and the "require" is not set either. However, the "index" is set with "no duplicates". What is going on here? Why is Access taking the primary key and not using the unique and not null contraints also? I know I can add just the NOT NULL contraint and at least get the "required" to turn on but that still does nothing for the "allow zero length". Here is a copy of my SQL to create the table. CREATE TABLE empInfo ( [SSN] Number NOT NULL, [Name] Text NOT NULL, [Phone] Number, [email] Text CONSTRAINT emailkey PRIMARY KEY, [HireDate] Date, [Salary] Currency, ); |
Thread Tools | |
Display Modes | |
|
|