Beruflich Dokumente
Kultur Dokumente
Language
(SQL)
Introduction
SQL is an international standard for defining and manipulating
SQL is simply a medium of communicating to the DBMS what the user wants it to do.
SQL is sometimes referred to as a non-procedural database language. It implies that the
SQL statements describe what data is to be retrieved, rather than specifying how to find
the data.
Introduction (Contd.)
Characteristics of SQL
Standard
independent
language
Cost effective
Speed
Cross-platform
Abilities
Characteristics
of SQL
Universality
Less programming
Scaling
DDL Commands
Data Definition Language or DDL consists of those commands in SQL that directly
create or delete database objects such as tables and indexes, specify links between
tables, and impose constraints between database tables.
CREATE TABLE Command: This command is used to define the structure of the table.
Syntax:
DML Commands
Data Manipulation Language or DML consists of those commands, which
operate on the data in the database. These include statements that add data to
the table as well as those statements that are used to query the database.
UPDATE table-name
SET column1 = value1
[, column2 = value2]
... ... ... ... ...
[, columnN = valueN]
[WHERE condition];
Example 1:
Example 2:
Example 3:
UPDATE EMPLOYEE
SET Salary = Salary + 1000;
UPDATE EMPLOYEE
SET Salary = Salary + 1000
WHERE Dept = RD01;
UPDATE EMPLOYEE
SET Salary = Salary + 1000, Dept = RD01
WHERE Empname =Price;
8
Example:
10