NEW
Font size
WorksheetsDBMS_LAB_06_12_22_Batch 1 2
Total questions: 20
Worksheet time: 16mins
Which option is not the command of DML ?
insert
update
alter
delete
drop, truncate, create are the commands of DDL?
True
False
____ is the clause which we use to choose the required data in the OUTPUT from the original table.
select
where
group by
_____ is used to filter out the data by applying condition on grouped data.
where
from
having
order by
How could we choose only unique values in a query?
SELECT UNIQUE
SELECT DISTINCT
SELECT SPECIAL
SELECT WITH NO DUPLICATE
What is the syntax to enter a new record into the "Sales" table?
INSERT INTO Sales VALUES
ALTER SALES NEW VALUES
SALES = SALES + NEW VALUES
SALES.ALTER.EDIT.CHANGE
What is the syntax to create a new table?
CREATE TABLE
MAKE TABLE
GENERATE TABLE
NEW TABLE
Which command is used for removing a table and all its data from the database:
Create command
Drop table command
Alter table command
All of the mentioned
SELECT * FROM Students WHERE Gender="Female" AND Class=2.2
would return how many records?
1
2
3
4
SELECT * FROM cars WHERE Doors > 3
would return how many records?
1
2
3
4
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
A keyword that use in sql syntax that gives a temporary name in the table column?
US
AS
ALIASES
SQL SYNTAX
Records that generate the matching values in both table
Right join
Inner join
Cross join
Case Statement
What is the difference between WHERE and HAVING?
HAVING only applies to aggregate functions like GROUP BY
There are interchangeable
WHERE specifies a GEOGRAPHIC location for a database server
WHERE has limited use
Why make views?
It is faster, safer and better practice to not allow general access to the production database
You should not, they are slow
You should not, they are inefficient
"View" is simply a synonym for the return of the SELECT function
ORDER BY specifies ...................................
the criteria you need to find the information
the table(s) that contain(s) the information
the information you want to find within the database
how the data is organized (sorted) when it is retrieved.
The SQL DELETE statement has the following structure:
DELETE FROM
Table
WHERE
Condition
DELETE FROM
Table
WHERE
Record
DELETE FROM
Field
WHERE
Table
Clause to extract details of employees whose FIRST NAME contains "are" anywhere is:
LIKE ('are%')
LIKE ('%are')
LIKE ('_are%')
LIKE ('%are%')
Which SQL keyword is used to make changes to the structure of a table (e.g. adding new columns)?
CHANGE
DROP
UPDATE
ALTER
Subqueries
Copy contents from one table into a brand new table
conditional that needs to be met by all terms
more powerful way to write queries (multiple for one combo); make sure to indent and color code each section
returns the string's soundex value (four character code that is based on how the string sounds when spoken in English
