SQL Commands: ============= SQL Statement: ------------- => also called as "SQL Query" which we can use to interact with Oracle database software. => The statement is the collection or group of pre-defined words or keywords or reserved words. Ex: select * from all_users; Note: ----- In SQL, we have the total of 44-keywords to use. => there are five types of SQL commands: 1) DDL (Data Definition Language) Commands 2) DML (Data Manipulation Language) Commands 3) DCL (Data Control Language) Commands 4) DRL/DQL (Data Retrieval Language/Data Query Language) Commands 5) TCL (Transaction Control Language) Commands. ==> The DDL commands involve in: the structure of the database objects like: table, view, functions, joints etc. That means: creation, modification, dropping etc. The major DDL commands are: create, alter, drop etc. ==> When we need to perform the operations/actions on the data of the database objects, we can use "DML commands". The major DML commands are: insert, update, delete etc. ==> DCL commands can always use by DBA (Database Admin) for granting or revoking of permissions to the DB users. The major DCL commands are: grant, revoke ==> To retrieve the data based on the condition or without condition we can use "DRL commands". Ex: Student Table with 100's of information from this, if I want to get the student info whose age is >= 15 => The DRL command is "select". ==> TCL Commands are used to control the transactions. The TCL commands are: 1) commit 2) rollback ============================================== Table Database Object: ====================== 1) Creation of the table object: -------------------------------- => by using a DDL command called "create", we can create the table. Syntax-1: --------- create database-object-name ( ); => to create the table: create table ( , , , ... .... ); Ex: Creation of the table with the name of "customerInfo" which includes the fields like: 1) SNO ==> number 2) CId ==> Number 3) CName ==> String 4) Age ==> Number 5) Gender ==> String 6) Location ==> String Syntax: create table customerInfo( SNo number(6), CId number(6), CName varchar2(50), Age number(3), Gender varchar(15), Location varchar2(50)); Rules for Identifiers: ===================== 1) Identifier must be start with alphabets only. 2) Allowed character set for identifier are: alphabets, digits, special characters (@, #, $, _) 3) Identifier never be the reserved word. 4) No space is allowed in the identifier.