RE: sql syntax INSERT

2001-10-01 Thread Joe Kaiping
You probably want a unique index for those cols. Check out: http://www.mysql.com/doc/C/R/CREATE_TABLE.html (search for unique in page) and http://www.mysql.com/doc/C/R/CREATE_INDEX.html -Joe > -Original Message- > From: Robert Martin [mailto:[EMAIL PROTECTED]] > Sent: Monday, October

Re: sql syntax INSERT

2001-10-01 Thread Adams, Bill TQO
Robert Martin wrote: > Hi, > > I?m still learning sql so I hope this doesn?t sound to basic. > > I would like to find out if there is a way to insert a record only when (X and Y) do >not exist. > I have the value to check against stored in a variable. ALTER TABLE table ADD UNIQUE u_xy_idx ( x,