sql 簡單查詢

1、加號的使用,如果是數值型,則數值相加,如果是字符串型,則字符串拼接

select PId + CategoryId from PhoneList

2、查詢空列

select * from PhoneList where Gender is null

3.常量列

select PId,PName,Gender,PhoneNumber,所在大學='天津大學' from PhoneList

4.限制固定行數

select top 5 StudentName,Gender,Birthday from Students

select top 20 percent StudentName,Gender,Birthday from Students

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章