Gossamer Forum
Home : General : Databases and SQL :

Use of UNIQUE - Question

Quote Reply
Use of UNIQUE - Question
I am designing a table which is part of a vehicle registry.

The table has an ID column as an its primary and autoincrementing key:

$c1->pk('ID');
$c1->ai('ID');

Another field in this table is the vehicles identification number (VIN) which needs to be unique. How do I force a unique set upon this column?

VIN => { pos => 2, type => 'INT', not_null => 1, regex => '^\d+$' },

I have read http://www.mysql.com/...A/L/ALTER_TABLE.html and the LSQL docs and I am still confused on the use of the UNIQUE syntax.

Thanks


http://www.iuni.com/...tware/web/index.html
Links Plugins
Subject Author Views Date
Thread Use of UNIQUE - Question Ian 5309 Jul 6, 2002, 9:49 AM
Thread Re: [Ian] Use of UNIQUE - Question
yogi 5154 Jul 6, 2002, 10:00 AM
Post Re: [yogi] Use of UNIQUE - Question
Ian 5055 Jul 6, 2002, 10:02 AM