sql 新建视图,日期以及选择显示

SELECT
    `fs_workingset`.`ID` AS `ID`,
    date_format(
        `fs_workingset`.`CREATETIME`,
        '%Y-%c-%d %H:%i:%S'
    ) AS `CREATETIME`,
    `fs_workingset`.`CREATER` AS `CREATER`,
    date_format(
        `fs_workingset`.`LASTMODIFYTIME`,
        '%Y-%c-%d %H:%i:%S'
    ) AS `LASTMODIFYTIME`,
    `fs_workingset`.`MODIFIER` AS `MODIFIER`,
    `fs_workingset`.`ORGID` AS `ORGID`,
    `fs_workingset`.`MATID` AS `MATID`,
    `fs_workingset`.`WORKINGNO` AS `WORKINGNO`,
    (
        CASE `fs_workingset`.`INVALID`
        WHEN 1 THEN
            '有效'
        WHEN 0 THEN
            '无效'
        END
    ) AS `INVALID`,
    `fs_workingset`.`WORKINGNAME` AS `WORKINGNAME`,
    `fs_workingset`.`REMARK` AS `REMARK`,
    `fs_workingset`.`WORKCENTERID` AS `WORKCENTERID`,
    `fs_workingset`.`WORKCENTERNAME` AS `WORKCENTERNAME`
FROM
    `fs_workingset`

你可能感兴趣的:(大数据,sql)