sql 转换占用空间的单位

(
            CASE
                    
                    WHEN IFNULL( ppam_res.table_size, 0 ) > 1024.0 * 1024.0 * 1024.0 * 1024.0 THEN
                    concat( ROUND( ppam_res.table_size / ( 1024.0 * 1024.0 * 1024.0 * 1024.0 ), 2 ), TB ) 
                    WHEN IFNULL( ppam_res.table_size, 0 ) > 1024 * 1024 * 1024 THEN
                    concat( ROUND( ppam_res.table_size / ( 1024.0 * 1024 * 1024 ), 2 ), GB ) 
                    WHEN IFNULL( ppam_res.table_size, 0 ) > 1024.0 * 1024.0 THEN
                    concat( ROUND( ppam_res.table_size / ( 1024.0 * 1024.0 ), 2 ), MB ) 
                    WHEN IFNULL( ppam_res.table_size, 0 ) > 1024.0 THEN
                    concat( ROUND( ppam_res.table_size / ( 1024.0 ), 2 ), KB ) 
                    WHEN IFNULL( ppam_res.table_size, 0 ) <  1024.0 THEN
                    concat ( ppam_res.table_size, B ) ELSE 0B 
                END 
                ) capacity

 

sql 转换占用空间的单位

上一篇:BestCoder Round #86 1001


下一篇:APPLE-SA-2019-3-25-2 macOS Mojave 10.14.4,Security Update 2019-002 High Sierra, Security Update 2019-002 Sierra