注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

和申的个人主页

专注于java开发,1985wanggang

 
 
 

日志

 
 

SQL Commands  

2008-09-12 12:03:15|  分类: 数据库 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

SQL Commands

This document discusses SQL commands used by Oracle Database Lite. Topics include:

4.1 SQL Command Types

The following lists the different types of SQL commands including clauses and pseudocolumns. An explanation of each SQL command, clause, and pseudocolumn is provided in "SQL Commands Overview".

SQL Commands

Table 4-2 Data Manipulation Language (DML)

DML DML
DELETE
SELECT
EXPLAIN PLAN
subquery::=
INSERT
UPDATE

Table 4-3 Transaction Control Commands

Command Command
COMMIT
SAVEPOINT
ROLLBACK
SET TRANSACTION

Table 4-4 Clauses

Clause Clause
CONSTRAINT clause
DROP clause

4.2 SQL Commands Overview

Oracle Database Lite uses several different types of SQL commands. This section discusses the different types of SQL commands.

4.2.1 Data Definition Language (DDL) Commands

Data definition language (DDL) commands enable you to perform the following tasks.

  • Create, alter, and drop schema objects

  • Grant and revoke privileges and roles

  • Add comments to the data dictionary

The CREATE, ALTER, and DROP commands require exclusive access to the object being acted upon. For example, an ALTER TABLE command fails if another user has an open transaction on the specified table.

4.2.2 Data Manipulation Language (DML) Commands

Data manipulation language (DML) commands query and manipulate data in existing schema objects. These commands do not implicitly commit the current transaction.

4.2.3 Transaction Control Commands

Transaction control commands manage changes made by DML commands.

4.2.4 Clauses

Clauses are subsets of commands that modify the command.

4.2.5 Pseudocolumns

Pseudocolumns are values generated from commands that behave like columns of a table, but are not actually stored in the table. Pseudocolumns are supported by Oracle but are not part of SQL-92.

4.2.6 BNF Notation Conventions

The syntax diagrams in this document use a variation of Backus-Nauer Form (BNF), a convention used to show syntax in many programming languages. Emphasis and symbols have the following meaning in this version of BNF syntax.

  • Keywords are shown in UPPERCASE.

  • Placeholders for which you must substitute an actual value are shown in lowercase. These can include clauses and other expressions.

  • Vertical (|) bars separate multiple choices. They indicate "or".

  • Parentheses and other punctuation enclosed in quotes must be typed as shown, for example "(".

  • Square brackets ( [] ) are not typed. They indicate that the enclosed syntax is optional.

  • Curly braces ( {} ) usually are not typed. They indicate that you must specify one of the enclosed choices. (The choices are separated by vertical bars.)

  • Loops or repetitions are indicated by a second, bracketed appearance of the term, set of terms, or expression, followed by ellipsis points. The brackets indicate that the repetition is optional (all repetitions are optional). The ellipsis points indicate that multiple repetitions are allowed. The bracketed appearance of the term begins with a comma if the repetitions are comma delimited.

  • All other punctuation (quotation marks, commas, semicolons, and so on) must be typed as shown.

4.3 SQL Commands Alphabetical Listing

This section lists Oracle Database Lite SQL commands, clauses, and pseudocolumns in alphabetical order and discusses each. This discussion includes the following.

  • Syntax

  • BNF Notation

  • Purpose

  • Prerequisites

  • Argument and Descriptions

  • Usage Notes

  • Examples

  • Related Topics

  • ODBC Functionality (where relevant)


    Note:

    All examples refer to sample database objects supplied with Oracle Database Lite. Some DDL examples may alter the structure and data of the sample database objects. To avoid altering the sample database objects, use the ROLLBACK command after each DDL example that you try in the database.
     

    ALTER SEQUENCE

    Syntax

    The syntax for the ALTER SEQUENCE command is displayed in Figure 4-1.

    Figure 4-1 The ALTER SEQUENCE Command

    ALTER SEQUENCE command
  评论这张
 
阅读(859)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016