PACE GK ACADEMY
Quiz Mode
Mock Test
Make Paper
Login
PACE GK ACADEMY
Home
Past Papers
PPSC Past Papers
FPSC Past Papers
ITS Past Papers
ECP Past Papers
MOD Past Papers
ASF Past Papers
Islamabad Police Past Papers
FIA Past Papers
FGEI Past Papers
ANF Past Papers
Current Affairs
Yearly Current Affairs (PACE)
Current Affairs Month Wise (PACE)
Pak Current Affairs (PACE)
World Current Affairs (PACE)
Current Affairs Past Papers (FPSC)
Pak Current Affairs (PPSC)
World Current Affairs (PPSC)
All-Subjects
Computer (PACE)
Pedagogy (PACE)
Federal Investigation Agency Act 1974 (PACE)
Analytical Ability (PACE)
Code of Criminal Procedure 1898 (PACE)
Constitution Of Pakistan (PACE)
Pakistan Penal Code 1860 (PACE)
Punjab Prevention Of Hoarding Act 2020 MCQS (PACE)
Law (FPSC)
General Knowledge (PPSC)
Pakistan Studies (PPSC)
Islamic Studies (PPSC)
World Current Affairs (PPSC)
Pakistan Current Affairs (PPSC)
Mathematics (PPSC)
English (PPSC)
Urdu (PPSC)
Everyday Science (PPSC)
Computer Skills (PPSC)
Geography (PPSC)
Audits & Accounting (PPSC)
Sports (PPSC)
Sociology (PPSC)
Personalities (PPSC)
Jobs
Success Stories
Articles & Insights
Login
SQL (PACE)
Download Pdf
Current Affairs
See All Subjects
Current Affairs Past Papers (FPSC)
Current Affairs Month Wise
Pak Current Affairs (PACE)
World Current Affairs (PACE)
Pak Current Affairs (PPSC)
World Current Affairs (PPSC)
Q.1
Which of the following query finds colors of boats reserved by "Dustin"?
SELECT DISTINCT b.color FROM boats b, reserves r, sailors s WHERE s.sname = 'Dustin' AND r.bid = b.bid
SELECT DISTINCT b.color FROM boats b, sailors s WHERE s.sname = 'Dustin' AND
SELECT DISTINCT b.color FROM boats b, reserves r, sailors s WHERE s.sname =
SELECT DISTINCT b.color FROM boats b, reserves r, sailors s WHERE s.sname = 'Dustin' AND s.sid = r.sid
(C)
Q.2
Which of the following query finds the names of the sailors who have reserved at least one boat?
SELECT DISTINCT s.sname FROM sailors, reserves WHERE s.sid = r.sid;
SELECT DISTINCT s.sname FROM sailors s, reserves r WHERE s.sid = r.sid;
SELECT s.sname FROM sailors s, reserves r WHERE s.sid = r.sid
None of These
(B)
Q.3
Find the name of cities with all entries whose temperature is in the range of 71 and 89?
SELECT* FROM weather WHERE temperature NOT IN (71 to 89)
SELECT* FROM weather WHERE temperature NOT IN (71 and 89);
SELECT* FROM weather WHERE temperature NOT BETWEEN 71 to 89;
SELECT * FROM weather WHERE temperature BETWEEN 71 AND 89;
(D)
Q.4
Find the name of all cities with their temperature, humidity and countries?
SELECT city, temperature, humidity, country FROM location
SELECT weather.city, temperature, humidity, country FROM weather, location
SELECT weather.city, temperature, humidity, country FROM weather, location WHERE weather.city = location.city
SELECT weather.city, temperature, humidity FROM weather SELECT country FROM location WHERE weather.city = location.city
(C)
Q.5
Find the names of the countries whose condition is sunny?
SELECT country FROM location WHERE condition = 'sunny';
SELECT country FROM location WHERE city IN (SELECT city FROM weather WHERE condition = 'sunny')
SELECT country FROM location WHERE city NOT IN (SELECT city FROM weather WHERE condition = 'sunny')
SELECT country FROM location WHERE city UNION (SELECT city FROM weather WHERE condition = 'sunny')
(B)
Q.6
Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79?
SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79
SELECT * FROM weather WHERE humidity IN (63 to 79)
SELECT* FROM weather WHERE humidity NOT IN (63 AND 79)
SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79
(D)
Q.7
Find all the tuples having temperature greater than 'Paris'?
SELECT * FROM weather WHERE temperature > 'Paris' temperature
SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = 'Paris')
SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = 'Paris
SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = 'Paris')
(B)
Q.8
Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy?
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70;
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' OR temperature
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;
(D)
Q.9
Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy
SELECT city, temperature, condition FROM weather WHERE condition BETWEEN
SELECT city, temperature, condition FROM weather WHERE condition NOT IN
SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN
SELECT city, temperature, condition FROM weather WHERE condition IN
(B)
Q.10
What is the meaning of LIKE '%0%0%?
Feature has two 0's in it, at any position
Feature begins with two 0's
ature ends with two 0's
Feature has more than two 0's
(A)
Q.11
Find the temperature in increasing order of all cities, Table Name 'weather'
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
(C)
Q.12
Find all the cities whose humidity is 89, Table Name weather?
SELECT city WHERE humidity
SELECT city FROM weather WHERE humidity
SELECT humidity
SELECT city FROM weather
(B)
Q.13
Which command undo all the updates performed by the SQL in the transaction?
DELETE
ROLLBACK
COMMIT
TRUNCATE
(B)
Q.14
Which of the following command makes the updates performed by the transaction permanent in the database?
DELETE
ROLLBACK
COMMIT
TRUNCATE
(C)
Q.15
Which of the following must be enclosed in double quotes?
Strings
Dates
Column Alias
All of the above
(D)
Q.16
Which of the following group functions ignore NULL values?
SUM
MAХ
COUNT
All of the above
(D)
Q.17
The SQL statement SELECT SUBSTR('123456789', INSTR('abcabcabc', 'b'), 4) FROM DUAL;
456789
6789
2345
1234
(C)
Q.18
Which SQL keyword is used to sort the result-set?
SORT
SORT BY
ORDER
ORDER BY
(C)
Q.19
Which SQL statement is used to delete data FROM a database?
DELETE
COLLAPSE
REMOVE
ALTER
(A)
Q.20
Which SQL statement is used to update data in a database?
MODIFY
SAVE
UPDATE
SAVE AS
(C)
Q.21
Which of the following is a SQL aggregate function?
LEN
LEFT
AVG
JOIN
(C)
Q.22
Which of the following SQL commands is used to retrieve data?
SELECT
DELETE
INSERT
JOIN
(A)
Q.23
What is a view?
A view is a database diagram.
A view is a special stored procedure executed when certain event occurs.
A view is a virtual table which results of executing a pre-compiled query. A view is not part of the physical database schema, while the regular tables are
None of these
(C)
Q.24
Which SQL keyword is used to retrieve a maximum value?
MAХ
TOP
MOST
UPPER
(A)
Q.25
Which SQL keyword is used to retrieve only unique values?
DIFFERENT
DISTINCTIVE
UNIQUE
DISTINCT
(D)
Q.26
The FROM SQL clause is used to_____?
specify search condition
specify what table we are selecting or deleting data FROM
specify range for search condition
None of these
(B)
Q.27
Which of the SQL statements is correct?
SELECT Username, Password FROM Users
SELECT Username AND Password FROM Users
SELECT Username, Password WHERE Username = 'user1'
None of these
(A)
Q.28
A command that lets you change one or more fields in a record is?
Look-up
Insert
Modify
All of the above
(C)
Q.29
In SQL, which command is used to SELECT only one copy of each set of duplicable rows?
SELECT DIFFERENT
SELECT DISTINCT
SELECT UNIQUE
ll of the above
(B)
Q.30
In SQL, which of the following is not a data definition language commands?
UPDATE
RENAME
REVOKE
GRANT
(A)
Q.31
In SQL, which command(s) is(are) used to change a table's storage characteristics?
CHANGE TABLE
ALTER TABLE
MODIFY TABLE
All of the above
(B)
Q.32
What operator tests column for the absence of data?
IS NULL operator
EXISTS operator
NOT operator
None of these
(A)
Q.33
Which operator performs pattern matching?
EXISTS operator
ВЕTWEEN operator
LIKE operator
None of these
(C)
Q.34
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Data Manipulation Language(DML)
Data Definition Language(DDL)
Both of above
None
(B)
Q.35
What is the full form of SQL?
Simple Query Language
Structured Query Language
Structured Query List
None of these
(B)