Oracle创建包、存储过程,及C#中调用
摘要:create or replace package body PK_DataTransfer is-- 积分卡合并 2009-7-14 procedure p_MemberMergence(s_SMemberID in nvarchar2,s_TMemberID in nvarchar2,n_Usersn in number) is begin update plus.tsell s set s...
阅读全文
posted @
2009-07-30 10:22
jameshappy
阅读(917)
推荐(0)
Oracle中建表,序列,触发器
摘要:-- Create table TMotifPromotioncreate table TMotifPromotion( MotifPromotionSN NUMBER(16) not null, MotifPromotionCode nvarchar2(10), MotifPromotionName nvarchar2(50), StartDate ...
阅读全文
posted @
2009-04-17 16:45
jameshappy
阅读(589)
推荐(0)
oracle中的序列
摘要:今天研发人员问起oracle中怎么设置自增,记得oracle中没有自增类型的字段的,所以通常情况下我们需要定义一个sequence来作为自动增长类型字段的数据。 于是记录了一些关于oracle sequence的资料,已备查用! Oracle中的序列(sequence) 1: 如何定义一个序列 仅向前的数字变量(和SQL中的自动编号有点像 identity(1,2) ) ...
阅读全文
posted @
2009-04-01 23:03
jameshappy
阅读(575)
推荐(0)
oracle表中有一列id她是自动增长的,插入一条数据时怎么取得id的值
摘要: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
阅读(1089)
推荐(0)
oracle中在已有的表中增加或删除一列
摘要: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
阅读(22514)
推荐(2)
Oracle中创建表,行级触发器,序列
摘要:create table TPointManage ( PointManageSn NUMBER(14) not null, --积分流水号 ghmembersn NUMBER(8), ----总部卡帐户流水号 mpointsum NUMBER(8), ------累计积分 CREATEDBY N...
阅读全文
posted @
2009-03-30 15:35
jameshappy
阅读(490)
推荐(0)
oracle中的函数
摘要:ORACLE中函数 Oracle已经内建了许多函数,不同的函数有不同的作用和用法,有的函数只能作用在一个记录行上,有的能够作用在多个记录行上,不同的函数可能处理不同的数...
阅读全文
posted @
2009-02-02 14:42
jameshappy
阅读(376)
推荐(0)
oracle中dual表的使用
摘要:dual表是一个虚拟表,用来和select语句一起使用。 1、查看当前用户 select user from dual 2、用来调用系统函数 select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual ----得到当前系统时间 select SYS_CONTEXT('USERENV','TERMINAL') from dual;--获得主...
阅读全文
posted @
2009-02-02 10:04
jameshappy
阅读(343)
推荐(0)