0% found this document useful (0 votes)
8 views1 page

SQL2

This document summarizes the key differences between DDL, DML, and DQL statements in SQL. DDL statements are used to define the structure of a table, DML statements manipulate the data within records of a table, and DQL statements are used to query and display data from a table. Some common statements include CREATE, ALTER, and DROP for DDL, INSERT, UPDATE, and DELETE for DML, and SELECT for DQL. The document also provides examples of how to use wildcards, group data, perform joins between tables, and lists some basic data types.

Uploaded by

blestrbhakt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

SQL2

This document summarizes the key differences between DDL, DML, and DQL statements in SQL. DDL statements are used to define the structure of a table, DML statements manipulate the data within records of a table, and DQL statements are used to query and display data from a table. Some common statements include CREATE, ALTER, and DROP for DDL, INSERT, UPDATE, and DELETE for DML, and SELECT for DQL. The document also provides examples of how to use wildcards, group data, perform joins between tables, and lists some basic data types.

Uploaded by

blestrbhakt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DML I

DDL
► Data Manipulation Language
► Data Definition Language
► Works with the records of the table
► Works with a table structure
► Contains 3 statements : Create, Alter and Drop ► Contains 3 statements: Insert, Update and Delete

□ DDL Statements
► Create : To create a table, create statement is used.
► Alter : It is used to add/modify/delete a column.
· The table structure as well as the records arc
► Drop : To drop or delete the complete · table.
completely removed from the memory.

□ DML Statements
► Insert : To insert records in the table.
► Update : To edit or make changes in the existing record.
► Delete : To delete records from the table.

□ DQL Statements
Contains One Single statement: 'Select' .
'Select' statement is used to display the records of the-table.

□ Things to Remember
► Commands are Case-Retentive (i.e. not Case Sensiti_v e).

► Data in the table is Case-Sensitive.


► Data-types Used : int, float, double, char, date, varchar.
Varchar: Variable Character, allocates memo!")' dynamically, unlike 'char'.

► Wild Card Characteristics: '_' & '%'


'_': Used for single char of any type
'%': Used for multiple char of any type

► 'Group By' Clause : It works on lots of records together. It combines a pool of values in ,
particular field to show certain grouping of data.

► Cartesian Product
The product of tuples of two or more than two tables. It has no relevance as it multiplies the
records of two or more than two tables without any criteria. ·
To rectify the problem & to proJuce relevant Output, 'Joins' are used!
□ Joins:
► Used to join two or more than two tables using a particular operator.
► 'Equi-Join' is a join which combines two or more than two tables using 'equal to(=)'
operator. .

You might also like