oralce中使用 count 函數判斷 行數 需要注意 一定是count 有值的字段,接下來看一組語句
1 --查詢數據 2 select * from kk_create_ka where auto_id='D7313B4716AD4062B82D3CD8513DA7A8';
1 --count 2 select count(I_E_Flag) from kk_create_ka where auto_id='D7313B4716AD4062B82D3CD8513DA7A8'; 3 select count(*) from kk_create_ka where auto_id='D7313B4716AD4062B82D3CD8513DA7A8'; 4 select count(1) from kk_create_ka where auto_id='D7313B4716AD4062B82D3CD8513DA7A8';
對應顯示結果:
推薦使用
count(1)
接下來看一下 SQL server
SQL server 列 是 NULL 值 也要注意