SQL语句荟萃

Posted 资料整理中。。。

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL语句荟萃相关的知识,希望对你有一定的参考价值。

1.查出多条数据只取第一条:select * from (select * from user) where rownum=1;

2.嵌套,子嵌套用到父sql的结果:

1 select a.id id,
2           (select b.name from B b where b.id = a.id and rownum = 1) name
3 from A a

 

以上是关于SQL语句荟萃的主要内容,如果未能解决你的问题,请参考以下文章