Hi all~
请教一个简单的SQL语句。
可以写成多条(存储过程)"如果某条记录在表中不存在,则插入一条,并选出刚刚插入的那条数据。"+---------------+
| xid (auto inc)| 
+---------------+
|       1       | 
|       2       | 
+----------------(类似下面这条语句,但下面这条语句不能返回结果)insert into tb  
    select 3 from dual where
        not exists( select * from tb where xid = 3 ) ;