questions with complete solution
SQL - n
Ans✔
is a domain-specific programming language designed for managing and
communicating with data held in a relational database management system
Qs
SQL is used for: - n
Ans✔
-creating databases
-adding, modifying and deleting database structures
-inserting, deleting and modifying records in databases
-querying databases
Qs
Data Definition Language (DDL) - n
Ans✔
used to create and modify the structure of the database
example: CREATE ALTER or DROP
Qs
Data Manipulation Language (DML) - n
Ans✔
used to insert, modify, delete and retrieve data
example: INSERT INTO UPDATE or DELETE
Qs
,Data Retrieval Language (DRL) - n
Ans✔
used to query or retrieve data from a database
example: SELECT
Qs
Data Control Language (DCL) - n
Ans✔
used for data access control
Qs
Transaction Control Language - n
Ans✔
used for managing database transactions
Qs
Keywords - n
Ans✔
These have a very specific meaning in the language. The statement must have at
least one. These often define the operation that is performed
Qs
Identifiers - n
Ans✔
These refer to the names of the tables and columns that are called or manipulated
Qs
Null Value - n
Ans✔
, is a marker for data that has not been entered or is missing, unknown, or
inapplicable
Qs
Not Null Constraint - n
Ans✔
is only a column constraint and not a table constraint; if you don't specify a _____,
the column will accept null values by default
Qs
Unique Constraint - n
Ans✔
forces each value of a column or table to be unique
Qs
Check Constraint - n
Ans✔
allows for limiting a particular column based on a particular value rules
These include:
minimum or maximum value
specified value
range of values
Qs
ALTER table - n
Ans✔
provides the ability to:
-add/drop a column
-alter a column's data type
-rename a column