SQL筆記
between操作符
select x,y
from p
where x between 5 and 10
在使用between時(shí),必須指出兩個(gè)值,所需的低端值和高端值。這兩個(gè)值必須用AND關(guān)鍵字分隔
空值檢查
NULL表示無值(no value)與字段包括0、空字符串或僅僅包含空格不同
select x
from p
where y is NULL
select x,y
from p
where x between 5 and 10
在使用between時(shí),必須指出兩個(gè)值,所需的低端值和高端值。這兩個(gè)值必須用AND關(guān)鍵字分隔
NULL表示無值(no value)與字段包括0、空字符串或僅僅包含空格不同
select x
from p
where y is NULL