`
收藏列表
标题 标签 来源
sql集合 SQL语句 操作集合

 //保留小数位数

select cast(列名as 数值类型,如decimal,numeric等 (长度,小数点后位数)) 列名 from 表名

例:select cast(Sid as decimal(18,2)) Sid from User

//case 用法

单条件:select case xxxxx when null then '0' else '1' end from xxxx

多条件:  select case xxxx when '' then '0' when null then '0' else xxxx end from xxxx
php Excel php导出到Excel 或 CSV (附utf8、gbk 编码转换)
<?
require "excel_class.php";

Read_Excel_File("Book1.xls",$return);
Create_Excel_File("ddd.xls",$return[Sheet1]);
?>
Global site tag (gtag.js) - Google Analytics