|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
delete statement doesn't delete rows
From: Alexey Gaidukov (gaid
dc.baikal.ru)
Date: Sun Aug 28 2005 - 20:33:30 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
a testcase
create table t1
(
c integer
)
//
create table t2
(
c integer
)
//
insert into t1 values(1)
//
delete from t1 where c in (select t1.c from t1,t2 where t1.c=t2.c(+) and
t2.c is null)
//
select * from t1
workaround
create table temp.t
(
c integer
)
//
insert into temp.t select t1.c from t1,t2 where t1.c=t2.c(+) and t2.c is
null
//
delete from t1 where c in (select c from temp.t)
//
select * from t1
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]