从SQL语言的分类谈COMMIT和ROLLBACK的用法(摘)
从功能上划分,SQL语言可以分为DDL,DML和DCL三大类。 1. DDL(Data Definition Language) 数据定义语言,用于定义和管理 SQL 数据库中的所有对象的语言 ; CREATE---创建表 ALTER---修改表 DROP---删除表 2. DML(Data Manipulation Language) 数据操纵语言,SQL中处理数据等操作统称为数据操纵语言 ; INSERT---数据的插入 DELETE---数据的删除 UPDATE---数据的修改 SELECT---数据的查询 DCL(Data Control Language) 数据控制语言,用来授予或回收访问数据库的某种特权,并控制数据库操纵
The different between NULL and ''
We can insert NULL into a column of a table.There are two examples,let's see the difference.1、INSERT INTO table_name VALUES( id,NULL);This method inserts NULL to a column of the table. 2、INSERT INTO table_name VALUES( id,'');This method doesn't insert NULL into the column ofthe table,because '' is a valid value,though it is a empty string.[@more@]
The different between DELETE TABLE AND TRUNCATE TABLE
TRUNCATE is faster than DELETE ,because it doesn't make a note of the change of the data.[@more@]
The usage of INSTR()
INSTR(表的某个字段,'外部传入的值') 1、INSTR(c1,c2[,n1[,n2]]) 返回c2在c1中位置l c2:要寻找的字符串l n2:第几个匹配项。大于0例如: INSTR(,,-) DUAL;[@more@]
About the REPORT name
If the report filename is test.rdf ,but the report name is test_1,then the complied report filename is test_1.rep.[@more@]
The usage of Union & Union All
1、UNION 中的每个查询必须包含相同的列、表达式或聚集函数(不过各个列不需要以相同的次序列出)2、列数据类型必须兼容:类型不必完全相同,但必须是DBMS可以隐含转换的类型(例如不同的数值类型或不同的日期类型)The following script gives some examples.[@more@]SQL> COLUMN cust_name FORMAT A20SQL> COLUMN cust_contact FORMAT A20SQL> COLUMN cust_email FORMAT A25SQL> SELECT cust_name,cust_contact,cust_email FROM customers;CUST_NAME CUST_CONTACT CUST_EMAIL -------------------- -------------------- ------
DISTINCT AND AVG()
If you use AVG() with distinct ,it will raise the average value.[@more@]
The usage of NULL with function
You can see the usage of NULL with function by the following scripts.FUNCTION:AVG()、COUNT()、SUM() AVG(): It doesn't consider the column which is null.If the record has 5 rows,the specified column has 3 real values and 2 null values,the AVG equals: the summmary of the 3 real value divied 3.(not 5)COUNT():It doesn't consider the column which is null.If the record has 5 rows,the specified column has 3 real values and 2 null values,the count equals:3(not 5)SUM():It doesn't consider the column whic
FORM 6i 安装
很久没有安装过FORM了,因为自己电脑基本半个月做一次GHOST,所以,常用的软件,很少会安装多次,这几日,自己的同事,被FORM的安装折腾的够呛,后来将瑞星给卸掉,再安装,就很顺利,在此,想给安装FORM6i的朋友提个醒,如果安装过程中,出现问题,请检查一下,是不是杀毒软件在作怪。[@more@]