select小技巧-增加自定义行或列
所属分类: MySQL 2019-11-05 15:30:49 编辑:admin 浏览次数 709 次
select 查询多一行自定义列表
select 0 as id,'请选择' as title union all
select gid as id,gname as title from 表名 where status=0
select 查询多一列自定义字段
select gid as id,gname as title ,0 as pid from 表名 where status=0
猜你喜欢
- mysql中使用show table 查看表信息 2019-01-29
- mysql查询表字段名称,字段类型 2019-01-29
- sql语句中取整数和小数部分,截取字符串常用函数 2019-03-21
- mysql函数-字符串操作 2019-04-09
- mysql函数-数字操作 2019-04-09
- mysql函数-时间操作 2019-04-09