一.查詢第二個(gè)字母是t或者a的雇員的全部信息
復(fù)制代碼 代碼如下:
select *
from employees
where firstname like '_[t,a]%'
二.更改字段名
復(fù)制代碼 代碼如下:
select '名字' = firstname ,'姓氏' = lastname
from employees
where firstname like '_[t,a]%'
復(fù)制代碼 代碼如下:
select firstname as '名字' , lastname as '姓氏'
from employees
where firstname like '_[t,a]%'
復(fù)制代碼 代碼如下:
/*檢索出符合條件的前70%條記錄*/
select top 70 percent firstname as '名字' , lastname as '姓氏'
from employees
where firstname like '_[t,a]%'1 /*檢索出符合條件的前2條記錄*/
select top 2 firstname as '名字' , lastname as '姓氏'
from employees
where firstname like '_[t,a]%'
復(fù)制代碼 代碼如下:
select *
from employees
where target='_blank'>服務(wù)器: 消息 8163,級(jí)別 16,狀態(tài) 4,行 1
不能以 DISTINCT 方式選擇 text、ntext 或 image 數(shù)據(jù)類型。
復(fù)制代碼 代碼如下:
select *
from employees
where src="http://www.survivalescaperooms.com/uploads/allimg/130603/111U2NF_1.jpg">
注意:order by是必須的,并且 compute by后的參數(shù)應(yīng)該在order by后的參數(shù)中出現(xiàn)過
復(fù)制代碼 代碼如下:
select sex,sclass,score
from student
compute sum(score)
新聞熱點(diǎn)
疑難解答
圖片精選