Database
文章平均质量分 77
chenaaron
a simple programmer
展开
-
PL/SQL
SQL>CREATE OR REPLACE PROCEDURE PrintMSG_Aaron(p_sys_code IN test.SYS_CODE%TYPE) AS CURSOR c_msg IS SELECT MSG_CODE,SYS_CODE FROM test WHERE SYS_CODE=p_sys_code AND ROWNUM<10; BEG...2007-05-14 11:16:55 · 76 阅读 · 0 评论 -
sysobjects中type的取值
C = CHECK 约束D = 默认值或 DEFAULT 约束F = FOREIGN KEY 约束L = 日志FN = 标量函数IF = 内嵌表函数P = 存储过程PK = PRIMARY KEY 约束(类型是 K)RF = 复制筛选存储过程S = 系统表TF = 表函数TR = 触发器U = 用户表UQ = UNIQUE 约束(类型是 K)...原创 2008-10-29 10:24:28 · 335 阅读 · 0 评论 -
SQL Server Temp Table
drop table #Tmp --删除临时表#Tmpcreate table #Tmp --创建临时表#Tmp( ID int IDENTITY (1,1) not null, --创建列ID,并且每次新增一条记录就会加1 WokNo varchar(50), primary key (ID) -...2008-04-02 09:21:21 · 1421 阅读 · 0 评论 -
Modify Oracle Process and Session
java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169869568)(ERR=12519)(ERROR_STACK=(ERROR=(CODE=12519)(EMFI=4)))) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.j...2008-01-28 21:34:36 · 115 阅读 · 0 评论 -
SQL SERVER TIPS
这些是 SQL-92 设置语句,使 SQL Server 2000/2005 遵从 SQL-92 规则。 当 SET QUOTED_IDENTIFIER 为 ON 时,标识符可以由双引号分隔,而文字必须由单引号分隔。当 SET QUOTED_IDENTIFIER 为 OFF 时,标识符不可加引号,且必须符合所有 Transact-SQL 标识符规则。 SQL-92 标准要求在对空值进行等于 (...2007-09-28 09:43:24 · 100 阅读 · 0 评论 -
SQL SERVER CONVERT FUNCTION
Default Datetime format in sql server:select getdate() 2004-09-12 11:06:08.177 SQL Server Datetime format conversion examples: select CONVERT(varchar, getdate(), 120 ) 2004-09-12 11:06:08select...2007-09-27 15:33:53 · 99 阅读 · 0 评论 -
Oracle Trigger
CREATE OR REPLACE TRIGGER TRAINING.TR_MIDAS_CLOSETTAFTER UPDATEON TRAINING.TT_TROUBLETKT REFERENCING NEW AS NEW OLD AS OLDFOR EACH ROWDECLAREBEGIN--IF SUBPRODUCT <> PAYPHONE AND SUBPRODUC...2007-08-25 08:28:48 · 162 阅读 · 0 评论 -
Oracle Function
CREATE OR REPLACE FUNCTION TRAINING.c1c3flt_cat_grp2(cof IN VARCHAR2)RETURN NUMBERISCAT_GRP NUMBER;BEGIN IF cof BETWEEN '604' AND '607' THEN CAT_GRP := 1; ELSIF (cof IN ('61...2007-08-25 08:25:47 · 203 阅读 · 0 评论 -
Create simple table in Oracle
CREATE TABLE COTS_TAB_BENE_LOOKUP_CODE( BRANCH VARCHAR2(3 BYTE) NOT NULL, MSGTYPE VARCHAR2(50 BYTE) NOT NULL, PARAM VARCHAR2(30 BYTE) ...2007-08-02 15:43:48 · 177 阅读 · 0 评论 -
ORACLE的隔离级别 (转)
隔离级别(isolation level) l 隔离级别定义了事务与事务之间的隔离程度。l 隔离级别与并发性是互为矛盾的:隔离程度越高,数据库的并发性越差;隔离程度越低,数据库的并发性越好。l ANSI/ISO SQL92标准定义了一些数据库操作的隔离级别:l 未提交读(read uncommitted)l ...2007-07-05 22:31:49 · 247 阅读 · 0 评论 -
Mysql grant
GRANT ALL PRIVILEGES ON *.* TO aaron@localhost IDENTIFIED BY 'xxxxxx' WITH GRANT OPTION;2007-06-08 21:22:58 · 107 阅读 · 0 评论 -
Import/export data in Mysql
Import the backup database file to Mysql,use below command.1.use cmd command to locate the mysql bin directory:e.g., C:\Program Files\MySQL\bin2. use the command to import data to database: my...原创 2010-08-01 20:28:12 · 145 阅读 · 0 评论