问题:如何清除以下输出中各列之间的空白?请帮助
output:
================================================
db_name data_size data_used data_used_pct log_size log_used log_used_pct
------------------------------------------------------------ ----------------------------------------------- -------------------------------- --------------------------------------- ----------------------------------------------- ------------------------------------------------ ---------------------------------------
E30 1026 8 1 100 1 1
SM1 60 4 6 20 1 1
master 26 12 43 NULL NULL 43
========================================================================
谢谢 拉杰什
答案 0 :(得分:0)
基于数据类型宽度的列宽。因此,如果您从具有varchar(255)的列中进行选择,则宽度将为255个字符。如果要减小列的宽度,则需要减小数据类型的宽度。例如:
select
convert(varchar(30), db_name) as db_name,
convert(numeric(10), data_size) as data_size,
...
from table