易截截图软件、单文件、免安装、纯绿色、仅160KB

sql时间比较操作常用函数

--日期转换参数,值得收藏
select CONVERT(varchar, getdate(), 120)
2004-09-12 11:06:08
select convert(varchar(10),getdate() ,120) 
----------
2009-04-09
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')
20040912110608
select CONVERT(varchar(12) , getdate(), 111 )
2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )
20040912
select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12
其它我不常用的日期格式转换方法:
select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004
select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004
select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004
select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004
select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004
select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004
select CONVERT(varchar(12) , getdate(), 108 )
11:06:08
select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1
select CONVERT(varchar(12) , getdate(), 110 )
09-12-2004
select CONVERT(varchar(12) , getdate(), 113 )
12 09 2004 1
select CONVERT(varchar(12) , getdate(), 114 )
11:06:08.177


相关文档:

Win7下面PL/SQL无法使用

今天发现在使用PL/SQL时,无法登陆。经过群里朋友的帮忙,最后圆满解决,现留个记录以便以后可查。
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
......

【常见的SQL Server连接失败错误以及解决方法】

                                         常见的SQL Server连接失败错误以及解决方法
 
A--S ......

sql操作手册

下列语句部分是Mssql语句,不可以在access中使用。
SQL分类: 
DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) 
DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) 
DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)
首先,简要介绍基础语句:
1、说明:创建数据库
CR ......

使用SQL语句启动SQL Server外围组件服务

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'CLR', 0
GO
-- To update the currently configured value for this feature. ......

SQL Server中未公布的扩展存储过程

SQL Server中未公布的扩展存储过程
作者: echsys,  出处:blog, 责任编辑: 李书琴, 
2008-09-09 07:00
  在SQL Server中包含了几个可以访问系统注册表的扩展存储过程。它们提供了在当前的SQL Server版本中访问系统注册表的能力,而且很多人利用SQL Server来进行攻击系统。本文介绍了如何在SQL Server中禁用他们。
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号