随笔分类 -  sqlserver,oracle,mysql

sqlserver,oracle,mysql
摘要:SQLServer时间日期函数详解,SQLServer,时间日期, 1. 当前系统日期、时间 select getdate() 2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值 例如:向日期加上2天 select dateadd(day,2,'2004-10-15') --返回:2... 阅读全文
posted @ 2009-02-02 17:09 起 点 阅读(200691) 评论(6) 推荐(7)
摘要:新建表: create table [表名] ( [自动编号字段] int IDENTITY (1,1) PRIMARY KEY , [字段1] nVarChar(50) default '默认值' null , [字段2] ntext null , [字段3] datetime, [字段4] money null , [字段5] int default 0, [字段6] Decimal (12,... 阅读全文
posted @ 2009-01-12 11:23 起 点 阅读(277) 评论(0) 推荐(0)
摘要:把日期转换为字符串: Date date = new Date(); System.out.println(date); java.text.DateFormat df = new java.text.SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); String s = df.format(date); System.out... 阅读全文
posted @ 2008-12-03 13:16 起 点 阅读(698) 评论(1) 推荐(0)
摘要:1、说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 1 1 法二:select top 0 * into b from a 2、说明:拷贝表(拷贝数据,源表名:a 目标表名:b) (Access可用) insert into... 阅读全文
posted @ 2008-12-02 17:34 起 点 阅读(657) 评论(2) 推荐(0)