zoukankan      html  css  js  c++  java
  • [Sql Server][原创] 常用 Sql 查询

    1、Convert DataTime 

    select 1 as flag,Convert(nvarchar(100),getdate(),1) as dateflag union all
    select 2 as flag,Convert(nvarchar(100),getdate(),2) as dateflag union all
    select 3 as flag,Convert(nvarchar(100),getdate(),3) as dateflag union all
    select 4 as flag,Convert(nvarchar(100),getdate(),4) as dateflag union all
    select 5 as flag,Convert(nvarchar(100),getdate(),5) as dateflag union all
    select 6 as flag,Convert(nvarchar(100),getdate(),6) as dateflag union all
    select 7 as flag,Convert(nvarchar(100),getdate(),7) as dateflag union all
    select 8 as flag,Convert(nvarchar(100),getdate(),8) as dateflag union all
    select 9 as flag,Convert(nvarchar(100),getdate(),9) as dateflag union all
    select 10 as flag,Convert(nvarchar(100),getdate(),10) as dateflag union all
    select 11 as flag,Convert(nvarchar(100),getdate(),11) as dateflag union all
    select 12 as flag,Convert(nvarchar(100),getdate(),12) as dateflag union all
    select 13 as flag,Convert(nvarchar(100),getdate(),13) as dateflag union all
    select 14 as flag,Convert(nvarchar(100),getdate(),14) as dateflag union all
    
    select 20 as flag,Convert(nvarchar(100),getdate(),20) as dateflag union all
    select 21 as flag,Convert(nvarchar(100),getdate(),21) as dateflag union all
    select 22 as flag,Convert(nvarchar(100),getdate(),22) as dateflag union all
    select 23 as flag,Convert(nvarchar(100),getdate(),23) as dateflag union all
    select 24 as flag,Convert(nvarchar(100),getdate(),24) as dateflag union all
    select 25 as flag,Convert(nvarchar(100),getdate(),25) as dateflag
    博客标明【原创】的文章都是本人亲自编写内容! 如有需要转载, 请标明出处:辉创1989(http://www.cnblogs.com/ahui1989/),届时非常感谢! 文章分享在此,希望我之原创有帮到你们! 如有不足之处也可联系我,以便我们共同探讨! 本人现职为Epicor10 系统 开发维护工作,如有需要可共同探讨相关技术知识及经验总结! QQ:929412592
  • 相关阅读:
    Kernel parameter requirements ( Linux DB2)
    db2 backup export
    db2 活动日志激增的原因分析处理
    db2 应用的最常见状态(转)
    db2 reorg到底需要多少表空间(转)
    HDLM for AIX安装
    db lock
    db2 tablespaces table bufferpools reorgs
    AIX文件系统和存储部署(转)
    真正看网络代码
  • 原文地址:https://www.cnblogs.com/ahui1989/p/7871201.html
Copyright © 2011-2022 走看看