带any嵌套查询 select emp.empno,emp.ename,emp.sal from scott.emp where sal>any(select sal from scott.emp where job='manager'); 等价于 select sal from scott.emp where job='manager' 结果为 sal:2975 2850 245...
SELECT case when not exists(SELECT Cons_Date FROM sbcHisMaster WHERE HisTypeNO='L' AND ProductSN ='M7D2028') THEN (SELECT Cons_Date FROM sbcHisMaster WHERE HisTypeNO='Y' AND ProductSN ='...
create table employee (empid int ,deptid int ,salary decimal(10,2)) insert into employee values(1,10,5500.00) insert into employee values(2,10,4500.00) insert into employee values(3,20,1900.00...
--得到数据库中所有用户表 Select [name] from sysObjects Where xtype='U'and [name]<>'dtproperties' Order By [name] --得到数据库中所有用户视图 Select [name] From sysObjects Where xtype='V' And [name]<>'syssegments' And...
select c_gcode,c_barcode,c_name,c_price_disc,c_price,c_status from tb_gds where ( c_price like '%._[1,2,3,4,5,6,7,8,9]%' or c_price_disc like '%._[1,2,3,4,5,6,7,8,9]%' )and c_weigh='否' and c_stat...