求个sql语句! 表名:unit(单位)字段:id(主键),name(单位名称)写一个sql语句实现如此啊功能: 现在有个id=6,看下他存在(select id from unit)中不,存在返回true,不存在返回false 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create table tb([id] int, [name] varchar(10) , [age] int, [shid] int)insert into tb values(1 , 'aaa' , 12 , 77 )insert into tb values(2 , 'bbb' , 16 , 77 )insert into tb values(3 , 'cccc', 17 , 79 )insert into tb values(4 , 'dddd', 18 , 79 )goif exists (select 1 from tb where id = 6) print '存在'else print '不存在' /*不存在*/drop table tb oracle安装 单行子查询返回多个行 求教高手,这个SQL语句怎么写? oracle 权限 ORA-14452: attempt to create, alter or drop an index on temporary table already 小弟请教 database links 的问题 关于Oracle 10g 的操作 我装oracle9可怎么也登陆不进去 如何检查表空间信息 为什么 alter system kill session '10,1033'; 不能杀死指定的会话? oracle.sdoapi.OraSpatialManager 找不到 请教一个树状查询语句问题?
insert into tb values(1 , 'aaa' , 12 , 77 )
insert into tb values(2 , 'bbb' , 16 , 77 )
insert into tb values(3 , 'cccc', 17 , 79 )
insert into tb values(4 , 'dddd', 18 , 79 )
goif exists (select 1 from tb where id = 6)
print '存在'
else
print '不存在' /*
不存在
*/
drop table tb