sql query language code example
Example 1: what is SQL
SQL full form is a structured query language, and it allows you to interact through commands with the database. Here are some of the SQL Database functions:
This allows users to retrieve information from the relational database.
It enables the development of tables and databases.
It allows data base and tables to be modified, added, removed, and changed.
It gives protection, and allows permission to be set.
Allows new ways for people to manage the info.
Example 2: SQL
CREATE TABLE friends (
id INTEGER,
name TEXT,
birthday DATE
);
INSERT INTO friends (id, name, birthday)
VALUES (1, 'Jane Doe', '1990-05-30');
INSERT INTO friends(id , name , birthday)
VALUES(2 , 'APOORV' , '2000-2-2');
UPDATE friends
SET name = 'Jane Srivastava'
WHERE id = 1;
ALTER TABLE friends
ADD COLUMN email TEXT;
UPDATE friends
SET email = '203029@klsafjls'
where id = 1;
UPDATE friends
SET email = '203029@klsafjls'
where id = 2;
DELETE FROM friends
WHERE id = 1;
SELECT *
FROM friends;
Example 3: what is sql
SQL is basically a programming language that lets people manipulate databases.
Example 4: what sql language
1- Data Manipulation Language(DML)-(SELECT, INSTERT, UPDATE...)
DML statements affect records in table. These are
basic operations we perform on data such as selecting
few records from a table, inserting new records,
deleting unnecessary records, updating existing records.
2-Data Definition Language (CREATE , ALTER , DROP)...
DDL statements are used to modify database or
table schema. These statements handle the design
and storage of database objects.
3-Data Control Language (GRANT , REVOKE)...
DCL statements control the level of access that
users have on database objects
4- Transaction Control Language (BEGIN TRAN, COMMIT TRAN, ROLLBACK)...
TCL statements allows us to control and manage
transactions to maintain the integrity of data
withing SQL statements.