From: sam1600 Date: April 14 1999 6:52am Subject: How make column UNIQUE NOT NULL AUTO_INCREMENT? List-Archive: http://lists.mysql.com/mysql/1815 Message-Id: <9904140252276G.18724@weba7.iname.net> MIME-Version: 1.0 Content-Type: Text/Plain Content-Transfer-Encoding: 7bit Hello, Ive been asking a lot of questions and I would like to say thanks a lot for all your responses. ---------- My first question is, how in Mysql do I make a column UNIQUE NOT NULL AUTO_INCREMENT and at the same time add an index on it? I tried: CREATE TABLE table_name ( column_name int(255) UNIQUE NOT NULL AUTO_INCREMENT , KEY column_Inxname (column_name) ) Mysql does not like the UNIQUE in there. If I take the UNIQUE out of the declaration it works but -phpMyAdmin- reports the Column and it's key as NOT UNIQUE ... But if I use phpMyAdmin to declare another index on the column it reports that the new ( second ) key is unique but the table dump shows no difference in the two Key declarations. So my second question is, what do I want UNIQUE, the key or the coulmn? and why can't I get the first key to be declared UNIQUE... not that i'm sure I want it to be... I thought I wanted the column (unique auto incrementing and not null)? Thanks, -Sam ---------------------------------------------------------------- Get your free email from AltaVista at http://altavista.iname.com