![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库学习笔记
文章平均质量分 74
hiding_nya
这个作者很懒,什么都没留下…
展开
-
学习笔记6.8
SELECT prod_nameFROM Products;SElECT prod_id,prod_name,prod_priceFROM Products;SELECT *FROM Products;SELECT DISTINCT vend_id--取不同FROM Products;select * from (select rownum rn,Products.prod原创 2015-06-19 23:33:03 · 212 阅读 · 0 评论 -
学习笔记6.9
select prod_name,prod_priceFROM productswhere prod_price =3.49;select prod_name,prod_priceFROM productswhere prod_price <> 3.49;select prod_name,prod_pricefrom productswhere prod_price betwe原创 2015-06-19 23:34:00 · 233 阅读 · 0 评论 -
学习笔记6.11
select vend_name,upper(vend_name) as vend_name_upcase--变成大写from Vendorsorder by vend_name; select vend_name,lower(vend_name) as vend_name_leftfrom Vendorsorder by vend_name;select vend_name,le原创 2015-06-19 23:36:04 · 363 阅读 · 0 评论 -
无聊的6.9
select vend_name || '(' || vend_country || ')'--把这两列调出来并且country加()from Vendorsorder by vend_name;--同上的作用,会去掉中间所有的空格select RTRIM(vend_name) || '(' || RTRIM(vend_country) || ')'from Vendorsorder原创 2015-06-19 23:35:10 · 372 阅读 · 0 评论 -
学习笔记6.15
--给表名起别名select cust_name,cust_contactfrom customers c,orders o,orderitems oiwhere c.cust_id=o.cust_idand oi.order_num=o.order_numand prod_id='RGAN01';--oracle无as关键字--自然联结select c.*,o.order_原创 2015-06-19 23:36:52 · 269 阅读 · 0 评论