COMPLETE QUESTIONS WITH CORRECT
DETAILED ANSWERS ||
100% GUARANTEED PASS
<RECENT VERSION>
1. What are the different types of SQL? - ANSWER ✔ Data definition, data
manipulation, and data control.
2. What does DDL do and what does it stand for? - ANSWER ✔ Data
definition language.
They are commands that define (create) and establish constraints.
3. What does DML do and what does it stand for? - ANSWER ✔ Data
manipulation language. Includes commands that maintain and query a
database.
4. What does DCL do and what does it stand for? - ANSWER ✔ Data control
language.
5. They are commands that administer privileges and execute data.
6. What is referential integrity? - ANSWER ✔ A constraint that states that
foreign key values of a table must match primary key values of the related
table.
7. Give the basic form for making a table in SQL. - ANSWER ✔ CREATE
TABLE tblname (columnname1 datatype not null primary key,.....)
,8. How do you add a FK to a table? - ANSWER ✔ ALTER TABLE tblname
ADD FOREIGN KEY (blankid) references tblname2(blankid)
9. How do you insert a full row of data into a table? - ANSWER ✔ INSERT
INTO tblname VALUES (1, 'Dodgers', '01/02/1980')
10.How do you insert a partial row of data? - ANSWER ✔ INSERT INTO
tblname (columnname1, comulmnname2) VALUES ('no',1)
11.How do you delete a whole table from a DB? - ANSWER ✔ DROP TABLE
tblname
12.How do you delete all rows from a table? - ANSWER ✔ DELETE FROM
tblname
13.Database Management System - ANSWER ✔ Software that handles the
storage, retrieval, and updating of data in a computer system
14.Data Definition Language (DDL) - ANSWER ✔ Commands that define a
database, including creating, altering, and dropping tables and establishing
constraints.
15.Data Manipulation Language (DML) - ANSWER ✔ Commands that
maintain and query a database
16.Data Control Language (DCL) - ANSWER ✔ Commands that control a
database, including administering privileges and committing data
,17.DDL - ANSWER ✔ CREATE tables, indexes, and views
Establish foreign keys
Drop or truncate tables
18.DML - ANSWER ✔ INSERT data
UPDATE the database
Manipulate the database: SELECT
19.DCL - ANSWER ✔ GRANT, ADD, REVOKE
20.Char(n) - ANSWER ✔ Stores string/text characters; fixed length
Example: Char(2)
21.Varchar(n) - ANSWER ✔ Stores string/text characters; variable length
Example: Varchar(255)
22.What is the purpose of the GROUP BY statement in SQL? - ANSWER ✔
To group the results by one or more columns.
23.Which SQL functions are commonly used with the GROUP BY statement? -
ANSWER ✔ COUNT, MAX, MIN, SUM, AVG.
24.GROUP BY Example - ANSWER ✔ SELECT Country,
COUNT(CustomerID) AS CustCount
, FROM Customer
GROUP BY Country
25.True or False
The CREATE TABLE SQL statement defines a new table and its columns. -
ANSWER ✔ True
26.True or False
In SQL, the UPDATE statement modifies data in an existing row (or rows) -
ANSWER ✔ True
27.DROP TABLE Statement - ANSWER ✔ Allows you to remove tables from
the database
28.DELETE FROM tablename WHERE condition - ANSWER ✔ Allows you
to remove certain rows from a table
29.DELETE FROM tablename - ANSWER ✔ Deletes all rows from a given
table
30.True or False
A relational database management system (DBMS) is a software package that
manages the connection between the database and the schema - ANSWER ✔
False
31.True or False