2009年4月1日
摘要: 今天研发人员问起oracle中怎么设置自增,记得oracle中没有自增类型的字段的,所以通常情况下我们需要定义一个sequence来作为自动增长类型字段的数据。 于是记录了一些关于oracle sequence的资料,已备查用! Oracle中的序列(sequence) 1: 如何定义一个序列 仅向前的数字变量(和SQL中的自动编号有点像 identity(1,2) ) ... 阅读全文
posted @ 2009-04-01 23:03 jameshappy 阅读(575) 评论(0) 推荐(0)
摘要: eg:users中有三个字段id,name,age sqlserver中是: insert into users(name,age) values('wangfen','20') select SCOPE_IDENTITY() select @@IDENTITY select IDENT_CURRENT('users') Oracle中... 阅读全文
posted @ 2009-04-01 22:49 jameshappy 阅读(1088) 评论(0) 推荐(0)
摘要: alert table 表名 add column 列名 alter table 表名 drop column 列名 eg: alter table TPointManage add AddPointsReason number(8) alter table textattrdetail drop column AddPointsReason 阅读全文
posted @ 2009-04-01 11:41 jameshappy 阅读(22511) 评论(1) 推荐(2)