Dept Department table
Classification of SQL statements
1 Data Manipulation Language DML
Insert (record inserted)
INSERT INTO Dept (DEPTNO,DEPTNAME,LOC) VALUES (28, ' teaching department ', ' Zhuhai ')
Update (Modify record)
Update Dept Set deptno=38 where deptno=28
Delete (deleting records)
Delete from dept where deptno=38
Query statements
Select Depno,deptname,loc from dept where deptno<50;
Data Definition Language DDL
CREATE DATABASE structure
Alter to modify the database structure
Drop DELETE Database structure
Rename Renaming a table
Truncate deleting data from a table
CREATE TABLE Testtab (
ID int,
C1 VARCHAR2 (50),
C2 Date
)
ALTER TABLE Testtab add C3 decimal (15,2)
drop table Testtab
Rename EMP to Employess
(table name) (table name)
TRUNCATE TABLE EMP
Things Control (TC)
Commit (permanent save changes made to the row)
INSERT INTO Dept VALUES (88, ' Operations department ', ' HK ')
Rollback
Undo, Roll back
Commit commit (no meaning in rollback after commit)
SavePoint
Data Control Language (DCL)
Grant grants other users permission to access the database structure
Revoke primarily prevents other users from accessing the database structure
Variable declaration
Condition control
Cycle
Definition of procedures and functions
This article is from the "Code of Things" blog, be sure to keep this source http://hw168.blog.51cto.com/10425348/1673217
Oracle BASIC Statement