`
wsql
  • 浏览: 11778306 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

建立时间的检视表MS SQL

 
阅读更多
如何提高效率
检视表
CREATE VIEW V_DATE
as
SELECT CONVERT(VARCHAR(10), GETDATE(), 120) AS today,
REPLACE(CONVERT(varchar(8), GETDATE(), 108), ':', '') AS time,
REPLACE(REPLACE(REPLACE(CONVERT(varchar, GETDATE(), 120), '-', ''), ' ', ''),
':', '') AS all_date, CONVERT(varchar(12), GETDATE(), 112) AS date,
YEAR(GETDATE()) AS year, MONTH(GETDATE()) AS month, DAY(GETDATE())
AS day, CONVERT(varchar(8), DATEADD(d, - 1, GETDATE()), 112) AS yestaday,
CONVERT(varchar(8), DATEADD(d, 1, GETDATE()), 112) AS tomorrow
分享到:
评论

相关推荐

    Aqua Data Studio 9.0.16 part 1

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 8.0.25 part 4

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 part 2

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 x64 Portable part 1

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 Portable part 1

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 x64 part 1

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 x64 part 2

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 x64 Portable part 2

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 9.0.16 Portable part 2

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 8.0.25 part 2

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 8.0.25 part 1

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

    Aqua Data Studio 8.0.25 part 3

    RDBMS 兼容性: (Oracle - 11g, 10g, 9i, 8i) (DB2 iSeries V5R3, V5R4, V6R1) (DB2 LUW - 9.7/9.x/8/7) (DB2 z/OS - V8/V9) (MS SQL Server - 2008/2005/2000/7/MSDE) (Sybase ASE - 15/12.x/11.x) (Sybase Anywhere...

Global site tag (gtag.js) - Google Analytics