當前位置:首頁 » 編程語言 » db2怎麼用sql判斷欄位有空格
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

db2怎麼用sql判斷欄位有空格

發布時間: 2022-12-06 15:29:16

Ⅰ db2中用SQL文導出一個結果文件, 結果文件中每行數據的行末都會有空格 這是為什麼呀 怎麼解決呀

你可以在每個欄位間用字元分隔。如
select a||'\'||b from biao;

Ⅱ db2資料庫中,查詢數據時判斷查詢欄位是否為空或空字元串,如果是就查

select * from table_name
where column_name is null
or column_name = ''

Ⅲ db2怎麼使用SQL判斷一個欄位是純數字還是純字母

select * from a where isnumeric(b)union allselect * from a where NOT isnumeric(b) --其中b為需要過濾掉的列名