LearnCoding SQL
LearnCoding SQL
INTRODUCTION TO
SQL
LEA
RN CODING
1.Insert
DML 2.Update
3.Delete
1.Grant
SQL DCL 2.Revoke
DQL 1.Select
1.Commit
TCL 2.Roll Back
3.Save point
Motivation.txt
CREATE TABL
E Employees (
ID Number,
Name VARCHAR(50),
Age Number);
Motivation.txt
Employee
ID NAME AGE
1 Akhilesh 22
2 Ankush 23
3 Ankit 23
Motivation.txt
Output:-
ID NAME AGE
2 Ankush 23
3 Ankit 23
Motivation.txt
2 Ankush 30
3 Ankit 23
Motivation.txt
Emp
ID Number
Name Varchar(10)
Age Number
GRANT statement:
Suppose you have a table named "Emp" and
you want to grant SELECT and INSERT
permissions to a user named "user1".
Motivation.txt
Motivation.txt
COMMIT statement:
Suppose you have performed a series of
data modifications (INSERT, UPDATE,
DELETE) and want to commit those
changes permanently to the database.
Motivation.txt
Commit;
Motivation.txt
Rollback;
SAVEPOINT statement:
Suppose you want to set a savepoint
within a transaction, allowing you to
rollback to that specific point if needed.
Motivation.txt
SAVEPOINT sp1;
Motivation.txt
ROLLBACK TO
SAVEPOINT sp1;
Motivation.txt
TRUNCATE TABLE
table_name;
Name Varchar(10)
Age Number
SEARCH:-
Motivation.txt
S
elect * from Emp*