Re: Quick "unique" question...

2003-04-01 Thread Noel Wade
Answered my own question. For posterity: "alter table abc add unique(foo, bar);" And the index will be created using the name of the first column you specify. Works like a charm! --Noel - Original Message ----- From: "Noel Wade" <[EMAIL PROTECTED]> To: <[EM

Auto_increment question...

2003-03-31 Thread Noel Wade
Hi All, Say I have a table with an auto_increment field that is being used at the primary key. When I insert a new record, is there any way to easily grab the primary key value for that new record? I had another unique field that I was originally going to use to do a select statement; but n

Quick "unique" question...

2003-03-31 Thread Noel Wade
I know its possible to use multiple fields for the primary key in a table i.e. "primary key(foo,bar)" Is it possible to do this with "unique" identifiers as well? Like "unique key(foo,bar)" ?? I already have a primary key on a table, but I'd also like to force two fields to form a unique comb

Re: Alter Table Question...

2003-03-27 Thread Noel Wade
Of course, I'd figure it out right after sending this. For the interested: "alter table XYZ drop key foo;" Take care, --Noel - Original Message - Given an existing table with a field defined as: "foo" char(60) not null unique What would be the proper syntax for an ALTER TA

Alter Table Question...

2003-03-27 Thread Noel Wade
Hi all, Hopefully a simple question for anyone who cares to take a swing at it: Given an existing table with a field defined as: "foo" char(60) not null unique What would be the proper syntax for an ALTER TABLE statement, to remove the unique constraint / key on this field? A "modify" doesn'