sql欄位個數
發布時間: 2022-06-26 07:58:56
① SQL查詢欄位數量
select COUNT(a.name) from sys.all_columns a,sys.tables b
where a.object_id=b.object_id and b.name='table_name'
② SQL如何查詢某欄位中某字元的個數
將要查詢欄位的長度減去該欄位將要查詢字元替換為空後的長度
select
len(欄位名)-len(replace(欄位名,要查詢的字元,''))from
table
③ 如何計算SQL其中一個欄位的數據個數
select count(*) from table where 某欄位='內容'
以上,希望對你有所幫助
熱點內容