下载此文档

oracle学习笔记.doc


文档分类:IT计算机 | 页数:约15页 举报非法文档有奖
1/15
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/15 下载此文档
文档列表 文档介绍
//查询数学分高于六十的学生信息
select , from (select * from grade where mark>60) a1,stu as a2,course a3
where = and = and =002
//排序
select mark from grade where stu_id = 1001 order by mark desc
select mark from grade where stu_id = 1001 order by mark asc
//取出重复的信息distinct 和unique
Select distinct customer_num
From orders

Select unique customer_num
From orders
30. 【】和||
Select phone[0,3]
From costomer
查询电话号码的前三位
Select ‘(‘||phone【1,3】||‘)‘||phone[5,12],company
From customer
字符串的相加
Where
Select order_num,order_date
From orders
Where order_date>’06/30/94’
Null
Select order_num,customer_num,ship_date
From orders
Where paid_date is null
Between 和and
Select customer_num,fname,pany
From customer
Where order_date between ‘05/01/94’ and ‘05/31/94’
In范围查询or
Select customer_num,fname,pany
From customer
Where customer_num in (110,150,111,118)
Mathches 和like
Select pany
From customer
pany matches ‘*sports’
Select *
From manufact
Where manu_name matches ‘[AN]*’
Select stock_num,manu_code,cat_advert
From catalog
Where cat_advert like ‘%\%%’
Escape 定义转移字符
Select stock_num,manu_code,cat_advert
From catalog
Where cat_advert like ‘%@%%’ escape ‘@’
Order by 加 asc/desc
Select manu-code,description,unut-price
From stock
Where description=’running shoes’
Order by unit-price
Select *
From stock
Order by manu-code asc,unit-price desc
Into temp
Select *
From customer
Where state=’CA’
Into temp cust_in_CA
多表查询
Select pany,lname,fname
From state,customer
Where code = state andsname = ‘California’
Select item_num
From items,stock
Where total_price >= unit_price*150
自连接
Select ,pany,
From customer c1, customer c2
Where =
And = 101
自连接与into temp
Select orders1, ship1,
orders2, ship2
from orders x, orders y
where >=5*
and i

oracle学习笔记 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
最近更新