- 浏览: 1376745 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (551)
- 计划 (4)
- java (115)
- oracle (60)
- ajax (3)
- javascript (64)
- 计算机操作技巧集 (11)
- 近期关注话题 (10)
- 随想 (13)
- html (6)
- struts (15)
- hibernate (16)
- spring (2)
- game (0)
- Eglish (10)
- DisplayTag (6)
- jsp (18)
- css (3)
- eclipse (3)
- 其他知识 (8)
- 备用1 (12)
- 备用2 (1)
- 笑话-放松心情 (9)
- 设计 (1)
- 设计模式 (1)
- 数据结构 (0)
- office办公软件 (5)
- webwork (0)
- tomcat (2)
- MySql (1)
- 我的链接资源 (5)
- xml (2)
- servlet (0)
- PHP (13)
- DOM (0)
- 网页画图vml,canvas (1)
- 协议 (2)
- 健康 (3)
- 书籍下载 (1)
- jbpm (1)
- EXT (1)
- 自考 (2)
- 报表 (4)
- 生活 (64)
- 操作系统基础知识 (2)
- 测试 (2)
- guice (1)
- google学习 (2)
- Erlang (1)
- LOG4J (2)
- wicket (1)
- 考研 (1)
- 法律 (1)
- 地震 (1)
- 易学-等等相关 (1)
- 音乐 (1)
- 建站 (4)
- 分享说 (3)
- 购物省钱 (0)
- linux (1)
最新评论
-
zenmshuo:
如果使用SpreadJS这一类的表格工具,应该能更好的实现这些 ...
js中excel的用法 -
hjhj2991708:
第一个已经使用不了
jar包查询网站 非常好用! -
jiangmeiwei:
...
中文乱码 我的总结 不断更新 -
gary_bu:
...
response.sendRedirect 中文乱码问题解决 -
hnez:
多谢指点,怎么调试也不通,原来我在<body>&l ...
ExtJs IE ownerDocument.createRange() 错误解决方案
建议看原文,格式比较好:
http://www.cs.rpi.edu/~sibel/dbs/FALL2003/system_info/oracle/sql_ddcmd.htm#alter
http://www.cs.rpi.edu/~sibel/dbs/FALL2003/system_info/oracle/sql_ddcmd.htm#alter
SQL Data Definition Language Commands (DDL) This page contains some useful SQL DDL commands. Each command's description is taken and modified from the SQL*Plus help. They are partially described. So, if you want more detail or other commands, please use HELP in the SQL*Plus directly. ALTER TABLE PURPOSE: To alter the definition of a table in one of these ways: * to add a column * to add an integrity constraint * to redefine a column (datatype, size, default value) * to modify storage characteristics or other parameters * to enable, disable, or drop an integrity constraint or trigger * to explicitly allocate an extent * to allow or disallow writing to a table * to modify the degree of parallelism for a table SYNTAX: ALTER TABLE [schema.]table [ADD { { column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} | ( { column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} [, { column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} ] ... ) } ] [MODIFY { column [datatype] [DEFAULT expr] [column_constraint] ... | (column [datatype] [DEFAULT expr] [column_constraint] ... [, column datatype [DEFAULT expr] [column_constraint] ...] ...) } ] [DROP drop_clause] ... Where: * schema : is the schema containing the table. If you omit schema, Oracle assumes the table is in your own schema. * table : is the name of the table to be altered. * ADD : adds a column or integrity constraint. * MODIFY : modifies a the definition of an existing column. If you omit any of the optional parts of the column definition (datatype, default value, or column constraint), these parts remain unchanged. * column : is the name of the column to be added or modified. * datatype : specifies a datatype for a new column or a new datatype for an existing column. * DEFAULT : specifies a default value for a new column or a new default for an existing column. Oracle assigns this value to the column if a subsequent INSERT statement omits a value for the column. The datatype of the default value must match the datatype specified for the column. A DEFAULT expression cannot contain references to other columns, the pseudocolumns CURRVAL, NEXTVAL, LEVEL, and ROWNUM, or date constants that are not fully specified. * column_constraint : adds or removes a NOT NULL constraint to or from and existing column. * table_constraint : adds an integrity constraint to the table. PREREQUISITES: The table must be in your own schema or you must have ALTER privilege on the table or you must have ALTER ANY TABLE system privilege. Example: To add an advisor column into the Student table, enter: SQL> ALTER TABLE Student ADD (advisor VARCHAR2(30)); Table altered. See also: CONSTRAINT, CREATE TABLE, DISABLE, DROP, ENABLE, STORAGE CREATE TABLE PURPOSE: To create a table, the basic structures to hold user data, specifying this information are: * column definitions * integrity constraints * the table's tablespace * storage characteristics * an optional cluster * data from an arbitrary query SYNTAX: CREATE TABLE [schema.]table ( { column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} [, { column datatype [DEFAULT expr] [column_constraint] ... | table_constraint} ]...) [AS subquery] Where: * schema : is the schema containing the table. If you omit schema, Oracle assumes the table is in your own schema. * table : is the name of the table to be created. * column : specifies the name of a column of the table. The number of columns in a table can range from 1 to 254. * datatype : is the datatype of a column. * DEFAULT : specifies a value to be assigned to the column if a subsequent INSERT statement omits a value for the column. The datatype of the expression must match the datatype of the column. A DEFAULT expression cannot contain references to other columns, the pseudocolumns CURRVAL, NEXTVAL, LEVEL, and ROWNUM, or date constants that are not fully specified. * column_constraint : defines an integrity constraint as part of the column definition. * table_constraint : defines an integrity constraint as part of the table definition. * AS subquery : inserts the rows returned by the subquery into the table upon its creation. If you include this clause, the column definitions can only specify column names, default values, and integrity constraints, not datatypes. Oracle derives column datatypes and lengths from the subquery. Oracle also automatically defines NOT NULL constraints on columns in the new table if they existed on the corresponding columns of the selected table and the subquery does not modify the column value with a SQL function or operator. A CREATE TABLE statement cannot contain both the AS clause and a referential integrity constraint definition. The number of columns must equal the number of expressions in the subquery. If all expressions in the subquery are columns, you can omit the columns from the table definition entirely. In this case, the names of the columns of table are the same as the columns in the subquery. PREREQUISITES: To create a table in your own schema, you must have CREATE TABLE system privilege. To create a table in another user's schema, you must have CREATE ANY TABLE system privilege. Also, the owner of the schema to contain the table must have either space quota on the tablespace to contain the table or UNLIMITED TABLESPACE system privilege. Example: To add an advisor column into the Student table, enter: SQL> CREATE TABLE Student ( Name VARCHAR2(30), StudentNumber NUMBER(4) NOT NULL, Class NUMBER(4), Major VARCHAR2(4), Primary key (StudentNumber) ); Table created. See also: ALTER TABLE, CONSTRAINT, CREATE CLUSTER, CREATE INDEX, CREATE CREATE VIEW PURPOSE: To define a view, a logical table based on one or more tables or views. SYNTAX: CREATE [OR REPLACE] [FORCE | NOFORCE] VIEW [schema.]view [(alias [,alias]...)] AS subquery [WITH CHECK OPTION [CONSTRAINT constraint]] Where: * OR REPLACE : recreates the view if it already exists. You can use this option to change the definition of an existing view without dropping, recreating, and regranting object privileges previously granted on it. * FORCE : creates the view regardless of whether the view's base tables exist or the owner of the schema containing the view has privileges on them. Note that both of these conditions must be true before any SELECT, INSERT, UPDATE, or DELETE statements can be issued against the view. * NOFORCE : creates the view only if the base tables exist and the owner of the schema containing the view has privileges on them. The default is NOFORCE. * schema : is the schema to contain the view. If you omit schema, Oracle creates the view in your own schema. * view : is the name of the view. * alias : specifies names for the expressions selected by the view's query. The number of aliases must match the number of expressions selected by the view. Aliases must follow the rules for naming schema objects. Aliases must be unique within the view. If you omit the aliases, Oracle derives them from the columns or column aliases in the view's query. For this reason, you must use aliases if the view's query contains expressions rather than only column names. * AS subquery : identifies columns and rows of the table(s) that the view is based on. A view's query can be any SELECT statement without the ORDER BY or FOR UPDATE clauses. Its select list can contain up to 254 expressions. * WITH CHECK OPTION : specifies that inserts and updates performed through the view must result in rows that the view query can select. The CHECK OPTION cannot make this guarantee if there is a subquery in the query of this view or any view on which this view is based. * CONSTRAINT : is the name assigned to the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of this form: SYS_Cn : where n is an integer that makes the constraint name unique within the database. PREREQUISITES: To create a view in your own schema, you must have CREATE VIEW system privilege. To create a view in another user's schema, you must have CREATE ANY VIEW system privilege. Example: To create a view CSStudent (computer science students) from the Student table, enter: SQL> CREATE OR REPLACE VIEW CSStudent AS SELECT * FROM Student WHERE Major = 'CS'; View created. See also: CREATE TABLE, CREATE SYNONYM, DROP VIEW, RENAME DROP TABLE PURPOSE: To remove a table and all its data from the database. SYNTAX: DROP TABLE [schema.]table [CASCADE CONSTRAINTS] Where: * schema : is the schema containing the table. If you omit schema, Oracle assumes the table is in your own schema. * table : is the name of the table to be dropped. * CASCADE CONSTRAINTS : drops all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this option, and such referential integrity constraints exist, Oracle returns an error and does not drop the table. PREREQUISITES: The table must be in your own schema or you must have DROP ANY TABLE system privilege. Example: To drop the Student table, enter: SQL> DROP TABLE Student; Table dropped. See also: ALTER TABLE, CREATE INDEX, CREATE TABLE, DROP CLUSTER DROP VIEW PURPOSE: To remove a view from the database. SYNTAX: DROP VIEW [schema.]view Where: * schema : is the schema containing the table. If you omit schema, Oracle assumes the table is in your own schema. * view : is the name of the view to be dropped. PREREQUISITES: The view must be in your own schema or you must have DROP ANY VIEW system privilege. Example: To drop the CSStudent view, enter: SQL> DROP VIEW CSStudent; View dropped. See also: CREATE SYNONYM, CREATE TABLE, CREATE VIEW
发表评论
-
oracle删除重复记录
2009-07-16 11:16 1241有困难,找猪八戒 Q:要删除一张表中的重复记录,但是要保留一条 ... -
db2 express-c 安装后检查及安装例子数据库
2009-02-27 17:07 3411摘自http://publib.boulder.ibm.com ... -
问:如何得到与WEB-INF同级目录下的配置文件
2008-09-23 08:35 2163Q: 有如下需求:需要从WEB-INF同级的目录下读取配 ... -
讨论如何优化这条sql
2008-09-11 16:33 1609SELECT * FROM ( ... -
N Vs Exist in SQL
2008-07-02 16:39 1406N Vs Exist in SQL 原文如下: http:// ... -
SQL 指南
2008-05-27 11:45 1066http://www.sql-tutorial.com/ -
orace 分析函数
2008-05-26 09:08 1245select x.num, sum(x.num) over ( ... -
oralce tutoial 指南
2008-03-22 14:21 1060http://www.exforsys.com/tutoria ... -
查找部分字段重复的记录 ORACLE Identifying duplicate rows
2008-03-13 08:49 1985http://www.jlcomp.demon.co.uk/f ... -
oracle 资源网站
2008-01-12 11:42 1896oracle alter table table_ ... -
Top 5 Oracle Reference Books 前5本 oracle 参考书
2008-01-12 11:24 1757http://databases.about.com/od/o ... -
Oracle与DB2、MySQL取前10条记录的对比<转>
2008-01-11 16:46 2235原文:http://tech.ccidnet.com/art/ ... -
expert on e on one oracle - Thomas Kyte 读书笔记
2008-01-11 10:17 2124=============================== ... -
oracle 资源 整体理解oralce 比较好 英文网
2008-01-09 16:59 1221http://www.adp-gmbh.ch/ora/admi ... -
oracle java 插入 clob insert clob hibernate
2007-12-21 15:48 7251用jdbc 或者 hibernate http://www.w ... -
pl/sql 应用之一
2007-12-12 17:21 1167declare begin insert into x ... -
init.ora文件所在目录
2007-12-12 15:58 2212Oracle安装盘:\oracle\admin\DB名称\pf ... -
[Oracle] 如何解决ORA-04031 错误
2007-12-12 15:53 3273[Oracle] 如何解决ORA-04031 ... -
oracle faq 常见问题解答 http://www.orafaq.com/
2007-12-12 13:34 1509The Oracle FAQ http://www.oraf ... -
oracle 快速参考
2007-12-12 09:58 1130http://www.psoug.org/library.ht ...
相关推荐
Oracle Database 11g是Oracle公司推出的一款关系型数据库管理系统,其Introduction to SQL教程主要针对初学者,旨在帮助用户理解并掌握SQL语言的基础知识,同时也会涉及到与Oracle数据库相关的PL/SQL编程。...
NoSQL,泛指非关系型的数据库。随着互联网web2.0网站的兴起,传统的关系数据库在应付web2.0网站,特别是超大规模和高并发的SNS类型的web2.0纯动态网站已经显得力不从心,暴露了很多难以克服的问题,而非关系型的...
在"Introduction to SQL (1).ppt"中,我们主要探讨了SQL的基础知识,包括快速理解SQL、关系代数以及更深入的SQL概念。 首先,SQL在45分钟内的概述(对应Chapter 5)旨在让读者快速掌握SQL的基本用法。这部分可能...
"加州大学伯克利分校的《Introduction to SQL》课件" 《Introduction to SQL》课件是加州大学伯克利分校出品的SQL教学资源,总共165页,纯英文,PDF格式。下面是该课件中所涉及的知识点: 1. 什么是SQL?SQL...
《Oracle9i: SQL3入门指南》一书深入探讨了Oracle9i数据库系统中的SQL语言高级应用,旨在为读者提供全面、深入的SQL知识体系,适用于Oracle认证专业人员(OCP)的学习与备考。以下是对该书籍核心知识点的详细解析: ...
introduction to PL-sql
【SQL简介】 SQL(Structured Query Language)是用于管理和处理关系数据库的标准编程语言。它以其简单易学和高效性著称,允许用户无需关注具体的数据处理细节,而是专注于描述想要执行的操作。SQL的设计哲学是让...
从给定的文件信息来看,文档标题和描述均标记为"introduction to -sql-plsql1",这表明文档旨在介绍SQL与PL/SQL的基本概念和技术。然而,文档的实际内容并未提供具体关于SQL或PL/SQL的信息,而是包含了版权、使用...
《Introduction to Oracle SQL and PL/SQL》是一本专为初学者设计的教程,全面涵盖了Oracle数据库管理系统中的核心语言——SQL(结构化查询语言)和PL/SQL(过程化语言/SQL)。这本书分为两卷,旨在帮助读者从基础到...
D33051 Introduction to oracle 9i_sql v1.pdf
根据提供的文件信息,我们可以从中提炼出与Oracle 9i SQL2相关的多个重要知识点。下面将对这些知识点进行详细的阐述。 ### Oracle 9i SQL2简介 #### 1. Oracle 9i SQL2背景 Oracle 9i SQL2是Oracle公司推出的一款...
Introduction to Oracle9i: SQL Electronic Presentation 英文版的
Introduction to Oracle9i: SQL Electronic Presentation 40049GC11 Production 1.1 October 2001
D33052 Introduction to oracle 9i_sql v2.pdf
本文档“Introduction to Oracle - Sql Plsql (Vol2)”介绍了Oracle数据库的核心组件:SQL和PL/SQL的基础知识及其高级应用。作为Oracle系列教程的一部分,它适用于那些已经对Oracle环境有所了解并希望进一步深入学习...
本资料“Introduction To ORACLE9i PL/SQL”提供了全英文的学习资源,适合对数据库编程有一定基础的读者深入学习。 PL/SQL全称为Procedural Language/Structured Query Language,即过程化结构化查询语言。它是...
### Oracle SQL与PL/SQL简介 #### 一、Oracle数据库概览 Oracle数据库是全球领先的数据库管理系统之一,广泛应用于各种企业级应用环境之中。它以其卓越的性能、可靠性及安全性而闻名于世。本篇文章旨在介绍Oracle...