Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Experiment (Data Base Management Systems) 3, Exercises of Database Management Systems (DBMS)

Includes inside third experiment of dbms

Typology: Exercises

2018/2019

Uploaded on 10/15/2019

krishna-trivedi
krishna-trivedi 🇮🇳

3 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
List of SQL Commands
BACKGROUND
SQL, Structured Query Language, is a programming language designed to manage data stored in
relaonal databases. SQL operates through simple, declarave statements. This keeps data
accurate and secure, and it helps maintain the integrity of databases, regardless of size.
COMMANDS
1.ALTER TABLE
ALTER TABLE lets you add columns to a table in a database.
2.AND
AND is an operator that combines two condions. Both condions must be true for the row to
be included in the result set.
3.AS
AS is a keyword in SQL that allows you to rename a column or table using an alias.
4.AVG()
AVG() is an aggregate funcon that returns the average value for a numeric column.
5.BETWEEN
The BETWEEN operator is used to lter the result set within a certain range. The values can be
numbers, text or dates.
6.CASE
CASE statements are used to create dierent outputs (usually in the SELECT statement). It is
SQL's way of handling if-then logic.
7.COUNT()
COUNT() is a funcon that takes the name of a column as an argument and counts the number
of rows where the column is not NULL.
8.CREATE TABLE
CREATE TABLE creates a new table in the database. It allows you to specify the name of the table
and the name of each column in the table.
9.DELETE
DELETE statements are used to remove rows from a table.
10.GROUP BY
pf3

Partial preview of the text

Download Experiment (Data Base Management Systems) 3 and more Exercises Database Management Systems (DBMS) in PDF only on Docsity!

List of SQL Commands

BACKGROUND

SQL, Structured Query Language, is a programming language designed to manage data stored in rela�onal databases. SQL operates through simple, declara�ve statements. This keeps data accurate and secure, and it helps maintain the integrity of databases, regardless of size.

COMMANDS

1.ALTER TABLE

ALTER TABLE lets you add columns to a table in a database.

2.AND

AND is an operator that combines two condi�ons. Both condi�ons must be true for the row to be included in the result set.

3.AS

AS is a keyword in SQL that allows you to rename a column or table using an alias.

4.AVG()

AVG() is an aggregate func�on that returns the average value for a numeric column.

5.BETWEEN

The BETWEEN operator is used to filter the result set within a certain range. The values can be numbers, text or dates.

6.CASE

CASE statements are used to create different outputs (usually in the SELECT statement). It is SQL's way of handling if-then logic.

7.COUNT()

COUNT() is a func�on that takes the name of a column as an argument and counts the number of rows where the column is not NULL.

8.CREATE TABLE

CREATE TABLE creates a new table in the database. It allows you to specify the name of the table and the name of each column in the table.

9.DELETE

DELETE statements are used to remove rows from a table.

10.GROUP BY

GROUP BY is a clause in SQL that is only used with aggregate func�ons. It is used in collabora�on with the SELECT statement to arrange iden�cal data into groups.

11.HAVING

HAVING was added to SQL because the WHERE keyword could not be used with aggregate func�ons.

12.INNER JOIN

An inner join will combine rows from different tables if the join condi�on is true.

13.INSERT

INSERT statements are used to add a new row to a table.

14.IS NULL / IS NOT NULL

IS NULL and IS NOT NULL are operators used with the WHERE clause to test for empty values.

15.LIKE

LIKE is a special operator used with the WHERE clause to search for a specific pa�ern in a column.

16.LIMIT

LIMIT is a clause that lets you specify the maximum number of rows the result set will have.

17.MAX()

MAX() is a func�on that takes the name of a column as an argument and returns the largest value in that column.

18.MIN()

MIN() is a func�on that takes the name of a column as an argument and returns the smallest value in that column.

19.OR

OR is an operator that filters the result set to only include rows where either condi�on is true.

20.ORDER BY

ORDER BY is a clause that indicates you want to sort the result set by a par�cular column either alphabe�cally or numerically.

21.OUTER JOIN

An outer join will combine rows from different tables even if the join condi�on is not met. Every row in the le� table is returned in the result set, and if the join condi�on is not met, then NULL values are used to fill in the columns from the right table.