P. 1
SQL

SQL

|Views: 513|Likes:
Published by manishgtk

More info:

Categories:Types, Research
Published by: manishgtk on Jul 12, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

06/19/2013

pdf

text

original

±You can add comments to a table or column by
using the COMMENT statement.

±Comments can be viewed through the following
data dictionary views:

‡ALL_COL_COMMENTS

‡USER_COL_COMMENTS

‡ALL_TAB_COMMENTS

‡USER_TAB_COMMENTS

SQL> COMMENT ON TABLE emp

2 IS 'Employee Information';

Comment created.
Comment created.

Summary

±Types of constraints:

‡NOT NULL

‡UNIQUE

‡PRIMARY KEY

‡FOREIGN KEY

‡CHECK

±Use data dictionary views to retrieve table,

column, and constraint information.

Summary

Statement

Description

CREATE TABLE

Creates a table

ALTER TABLE

Modifies table structures

DROP TABLE

Removes the rows and table structure

RENAME

Changes the name of a table, view,
sequence, or synonym

TRUNCATE

Removes all rows from a table and
releases the storage space

COMMENT

Adds comments to a table or view

Create and maintain tables using the
Create and maintain tables using the
following statements:
following statements:

Create and maintain tables using the
Create and maintain tables using the
following statements:
following statements:

SQL Statements

‡SELECT

‡INSERT
‡UPDATE
‡DELETE

‡CREATE
‡ALTER
‡DROP
‡RENAME
‡TRUNCATE

‡COMMIT
‡ROLLBACK
‡SAVEPOINT

Data Retrieval
Data Retrieval

Data manipulation language (DML)
Data manipulation language (DML)

Data definition language (DDL)
Data definition language (DDL)

Transaction Control Language (TCL)
Transaction Control Language (TCL)

Contolling Transactions

TCL

Contolling Transactions

TCL

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->