--條件查詢: select 列名列表 from 表名 where 條件
--where 條件:用來篩選滿足條件的記錄(行)
--條件有6種形式:
--1.比較大小:列名 比較運算子 值
--查詢圖書**超過30元的圖書資訊
select * from book where price>30
--查詢清華大學出版社出版的圖書資訊
select * from book where publish='清華大學出版社'
--查詢2005-1-20日借書的圖書編號
select * from borrow where borrowdate='2005-1-20'
--2.範圍查詢,
--查詢在2023年出生的讀者資訊
select * from reader
where birthdate between '1976-1-1' and '1977-1-1'
--3.符合條件用and,or連線各條件
--查詢各圖書**不再20-40之間的圖書資訊
select * from book where price not between 20 and 40
--集合查詢: 列名【not】 in (值列表)
--查詢圖書**是20,30,40,的圖書資訊
--查詢清華大學,同濟大學出版社出版的圖書資訊
select * from book where price=20 or price=30 or price=40
select * from book where price in (20,30,40)
select * from book where publish='清華大學出版社' or publish='同濟大學出版社'
select * from book where publish not in('清華大學出版社','同濟大學出版社')
sql 語句 查詢
例11 1 1 use xk gocreate trigger test1 on student for update as print 記錄已修改!go 2 update student set pwd 11111111 where stuno 00000001 例11 3 1 use xk go...
SQL查詢語句
create or replace procedure imms pk reportsend fromdate varchar2,todate varchar2 as function 系統效能統計 author qja 功能 將imms statusreport 表和imms report sen...
SQL查詢語句
sql查詢語句 select from film order by year limit 10 select from film order by year desc limit 10 select count from film select from film where starring li...