Re: How to do similar query like Oracle using not exists

2001-12-03 Thread Benjamin Pflugmann
Hi. On Mon, Dec 03, 2001 at 06:24:14PM -0500, [EMAIL PROTECTED] wrote: > > I try to do an Oralce query in mySQL > > insert into geoTable select '011852','HK' from dual where not exists > (select * from geoTable where geoID = '011852') > > In Oracle, this query will check the new geoID is not e

How to do similar query like Oracle using not exists

2001-12-03 Thread Wai Lee
Hi, I try to do an Oralce query in mySQL insert into geoTable select '011852','HK' from dual where not exists (select * from geoTable where geoID = '011852') In Oracle, this query will check the new geoID is not exist before inserting into the table. In mySQL, I do create temporary table tmp1