Presentation is loading. Please wait.

Presentation is loading. Please wait.

Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.

Similar presentations


Presentation on theme: "Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME."— Presentation transcript:

1 Murali Mani SQL DDL and Oracle utilities

2 Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME

3 Murali Mani SQL DDL DDL = Data Definition Language Create tables, columns of tables, types of columns, primary key constraints, unique constraints, foreign key constraints Drop tables, add/drop columns, add/drop constraints – primary key, unique, foreign key

4 Murali Mani Creating Tables CREATE TABLE (, …, [CONSTRAINT ] PRIMARY KEY (…), [CONSTRAINT ] UNIQUE (…), [CONSTRAINT ] FOREIGN KEY (…) REFERENCES (…) );

5 Murali Mani Dropping tables DROP TABLE

6 Murali Mani Adding/Dropping Columns ALTER TABLE ADD ; ALTER TABLE DROP COLUMN ;

7 Murali Mani Adding/Dropping Constraints ALTER TABLE ADD [CONSTRAINT ] … ALTER TABLE DROP CONSTRAINT

8 Murali Mani SQL DML: Basic DML = Data Manipulation Language Consists of Queries and Modification Modification: Inserting/Deleting values from table Insert a value into a table INSERT INTO VALUES (…) eg: INSERT INTO Student VALUES (1, ‘Dave’); Delete all values from a table DELETE FROM


Download ppt "Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME."

Similar presentations


Ads by Google