Structured Query Language (SQL)
Structured Query Language (SQL)
QUERY
LANGUAGE
BY:
K.SANJAY
Structured Query
Language (SQL) is a
standard
STR programming
UCT language used for
managing and
URE manipulating
D relational
QUE databases.
RY
LAN
GUA
GE
UPDATE table_name
SET column1 = value1, column2 =
value2, ...
WHERE condition;
MOD For Example:
IFYI Suppose we have a table called eml
and you want to update the salary o
NG employee with the ID of 5:
DAT UPDATE employees
SET salary = 60000
A IN WHERE employee_id = 5;
TAB
LES
DELETE FROM
<tablename>
[WHERE <predicate>]
DEL For Example:
ETIN Suppose we have a table
named students and we
G have to delete a table,
student named Bob
DAT DELETE FROM students
A WHERE name = 'Bob';
FRO
M
TAB
LES
ALTER TABLE <tablename>
MODIFY (columname
newdatatype (newsize) ) [FIRST
l AFTER column]
For Example:
Removing the email column
ALT from the students table:
ALTER TABLE students
ERI
DROP COLUMN email;
NG
TAB
LES
DROP TABLE table_name;
For Example:
If you have a table called
Students that you want to
remove , the command
would be like this:
DRO DROP TABLE students;
PPIN
G
TAB
LES