av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

SQL條件語(yǔ)句實(shí)例

在SQL語(yǔ)句中,SQL條件語(yǔ)句無(wú)疑是使用最廣,最常見(jiàn)的SQL語(yǔ)句之一,下面就將為您介紹幾個(gè)使用SQL條件語(yǔ)句,供您學(xué)習(xí)參考。

----查詢StudentMarks 最大的前三條記錄

select  top 3 StudentID,StudentName,Mark from StudentMarks order by Mark desc

----查詢StudentMarks 的第30~40條記錄

1、從前30條的后面, 取前10條

select top 10 * from StudentMarks where StudentID not in(select top 30 StudentID from StudentMarks)

2、先正序取40條, 再反序取10條

select top 10* from (select top 40* from StudentMarks order by Mark ) a
order by Mark desc

3、、利用臨時(shí)表
select top 40 * into #Stm from StudentMarks order by Mark

select top * from #Stm  order by Mark desc

----查詢和London同屬于一個(gè)國(guó)家的城市的客戶
select distinct * from customers where country in
( select country from customers where city='London')

----查詢和London,Paris同屬于一個(gè)國(guó)家的城市的客戶
select * from customers where country in
(select country from Customers where City in ('London','Paris'))

----查詢單價(jià)大于Dofu的產(chǎn)品名
select ProductName from Products where UnitPrice>
(select UnitPrice from Products where ProductName='Tofu')


網(wǎng)頁(yè)標(biāo)題:SQL條件語(yǔ)句實(shí)例
網(wǎng)頁(yè)地址:http://uogjgqi.cn/article/coghdhp.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們?cè)谖⑿派?4小時(shí)期待你的聲音

解答本文疑問(wèn)/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流