NEW
Font size
WorksheetsL6 Lent
Total questions: 78
Worksheet time: 37mins
Which of the following SQL clauses is used to DELETE tuples from a database table?
DELETE
REMOVE
DROP
CLEAR
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
ASC
DESC
There is no default value
None of the mentioned
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?
SELECT * FROM Persons WHERE FirstName=’a’
SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
SELECT * FROM Persons WHERE FirstName=’%a%’
What does the ALTER TABLE clause do?
The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints
The SQL ALTER TABLE clause is used to insert data into database table
THE SQL ALTER TABLE deletes data from database table
The SQL ALTER TABLE clause is used to delete a database table
The UPDATE SQL clause can _____________
update only one row at a time
update more than one row at a time
delete more than one row at a time
delete only one row at a time
How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
SQL query to find all the cities whose humidity is 95.
SELECT city WHERE humidity = 95
SELECT city FROM weather WHERE humidity = 95
SELECT humidity = 89 FROM weather
SELECT city FROM weather
SQL query to find the temperature in increasing order of all cities.
SELECT city FROM weather ORDER BY temperature
SELECT city, temperature FROM weather
SELECT city, temperature FROM weather ORDER BY temperature
SELECT city, temperature FROM weather ORDER BY city
Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
The command to remove rows from a table ‘CUSTOMER’ is __________________
DROP FROM CUSTOMER
UPDATE FROM CUSTOMER
REMOVE FROM CUSTOMER
DELETE FROM CUSTOMER WHERE
What does SQL stand for?
Structured Query Language
Strong Question Language
Structured Question Language
Which SQL statement is used to extract data from a database?
SELECT
OPEN
GET
EXTRACT
Which SQL statement is used to update data in a database?
SAVE AS
UPDATE
MODIFY
SAVE
Which SQL statement is used to delete data from a database?
DELETE
COLLAPSE
REMOVE
Which SQL statement is used to insert new data in a database?
INSERT NEW
ADD NEW
INSERT INTO
ADD RECORD
With SQL, how do you select a column named "FirstName" from a table named "Persons"?
EXTRACT FirstName FROM Persons
SELECT FirstName FROM Persons
SELECT Persons.FirstName
With SQL, how do you select all the columns from a table named "Persons"?
SELECT Persons
SELECT * FROM Persons
SELECT *.Persons
SELECT [all] FROM Persons
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?
SELECT [all] FROM Persons WHERE FirstName='Peter'
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
SELECT * FROM Persons WHERE FirstName='Peter'
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?
SELECT * FROM Persons WHERE FirstName LIKE 'a%'
SELECT * FROM Persons WHERE FirstName='a'
SELECT * FROM Persons WHERE FirstName LIKE '%a'
SELECT * FROM Persons WHERE FirstName='%a%'
The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true
False
True
With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'
SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
SELECT FirstName='Peter', LastName='Jackson' FROM Persons
With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'
SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons
SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'
Which SQL statement is used to return only different values?
SELECT UNIQUE
SELECT DISTINCT
SELECT DIFFERENT
Which SQL keyword is used to sort the result-set?
SORT
ORDER BY
SORT BY
ORDER
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
SELECT * FROM Persons SORT 'FirstName' DESC
SELECT * FROM Persons SORT BY 'FirstName' DESC
SELECT * FROM Persons ORDER FirstName DESC
SELECT * FROM Persons ORDER BY FirstName DESC
With SQL, how can you insert a new record into the "Persons" table?
INSERT ('Jimmy', 'Jackson') INTO Persons
INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?
INSERT INTO Persons (LastName) VALUES ('Olsen')
INSERT INTO Persons ('Olsen') INTO LastName
INSERT ('Olsen') INTO Persons (LastName)
How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
DELETE ROW FirstName='Peter' FROM Persons
DELETE FirstName='Peter' FROM Persons
DELETE FROM Persons WHERE FirstName = 'Peter'
With SQL, how can you return the number of records in the "Persons" table?
SELECT NO(*) FROM Persons
SELECT COUNT(*) FROM Persons
SELECT LEN(*) FROM Persons
Dividing tasks so that the Operating System appears to multitask is dealt with under
Memory Management
File Management
User Management
Peripheral Management
which one of the following is not a Utility Program?
Disk Defragmentation Tool
Compression
Web Browser
Encryption
What kind of Hard drive gets fragmented?
Magnetic
Solid state
Both
What is NOT a type of User Interface?
IOS
Graphical User
Command Line
Menu Driven
What are the FIVE functions of an Operating System?
User Interface, User management, File management, Utility programs, Optical storage
User Interface, Solid state, Peripheral management, File management, Memory management
File management, Memory sharing, User management, Peripheral management, Solid state storage
Memory management, File management, User interface, User management, Peripheral management,
What is User management?
Manages the passwords of every user
Controls levels of access by different users
Admin rights
Allows everyone to create a profile
