当前位置:首页>开发>正文

Oracle数据库SQL查询语句怎样实现 sql语句的基本应用

2023-07-04 08:19:56 互联网 未知 开发

 Oracle数据库SQL查询语句怎样实现 sql语句的基本应用

Oracle数据库SQL查询语句怎样实现

select e.a, case e.b=1 then e.b end b1, case e.b=2 then e.b end b2, case e.b=3 then e.b end b3 from emp e

sql语句的基本应用

是sqlserver数据库的话可以使用top关键字select top10 * from where id not in(select top 30 id from table)mysql可以使用limit关键字select * from table limit 30,40oracle可以使用rownumselect * from table where rownum >30 and rownum <40

oracle程序中能用sql语句吗

数据库中增删改查四种操作的代码都是一样的。我曾修过这门课,并且上传了一份实验的报告。这门课的所有实验都有,你可以看一看。在文库中搜素“ORACLE数据库实验”,贡献者就是我(pmq5205209)。

sql语句在实际应用中咋使用;

1、select sname from s where sno not in (select sno from sc where cno in (select cno from c where cteacher=李明)
2、select distinct b.sname,a.avg from
(select sno,count(cno),avg(scgrade) avg from sc group by sno having count(cno)>=2) a
left join s b on a.sno=b.sno
3、select sname from s where sno in (select sno from
(select sno ,count(con) from sc where con in (1,2) group by sno having count(con)>1))
4、select sno from sc where scgrade>(select scgrade from sc where con=1 and sno=2)
5、select a.sno,a.cno as cno_1,b.cno as cno_2 from
(select sno, cno,scgrade from sc where cno=1)a,
(select sno, cno,scgrade from sc where cno=2)b where a.sno=b.sno

最新文章