Technical :: All Aptitude Test ::

Hassan
1.Which function is used to divides one numeric expression by another and get the remainder ?
A. POWER
B. MOD
C. ROUND
D. POWER

2. In a sql subquery , which operator is used to check for existence of record ?
A. SQL NOT NULL
B. SQL AS
C. SQL EXISTS
D. SQL NOT NULL

3. Correct SQL query syntax to update a record from a table is :
A. UPDATE table_name SET column1 = value1, column2 = value2, … WHERE condition;
B. UPDATE table_name SET COLUMN column1 = value1, column2 = value2, … WHERE condition;
C. UPDATE table_name UPDATE column1 = value1, column2 = value2, … WHERE condition;
D. UPDATE table_name SET column1 = value1, column2 = value2, … WHERE condition;

4.Which is called as a virtual table in SQL?
A. INNER JOIN
B. JOIN
C. VIEW
D. INNER JOIN

5.To specify the number of records to return, which keyword is used :
A. FIRST
B. TOP
C. START
D. FIRST

6.To search for a specified pattern in a column :
A. SQL MATCH
B. SQL LIKE
C. SQL PATTERN
D. SQL MATCH

7.Which clause is used to combine rows from two or more tables based on a related column between them.
A. SQL MATCH
B. SQL JOIN
C. SQL PATTERN
D. SQL MATCH

8.To combine the result-set of two or more SELECT statements, SQL clause used is :
A. SQL UNION
B. SQL JOIN
C. SQL GROUP BY
D. SQL UNION

9.In a table, a column contains duplicate value, if you want to list all different value only, then which SQL clause is used?
A. SQL DISTINCT
B. SQL UNIQUE
C. SQL BETWEEN
D. SQL DISTINCT

10.To give a temporary name to a table, or a column in a table for more readability, what is used?
A. SQL Wildcards
B. SQL aliases
C. SQL LIKES
D. SQL Wildcards

11.Logical operators used in SQL are :
A. AND, OR , NOT
B. &&, ||, !
C. $,|,!
D. AND, OR , NOT

12.Select name from instructor where dept name = ’Physics’ order by name; By default, the order by clause lists items in ______ order.
A. Descending
B. Any
C. Same
D. Descending

13.Select * from instructor order by salary ____, name ___; To display the salary from greater to smaller and name in ascending order which of the following options should be used ?
A. Ascending, Descending
B. Asc, Desc
C. Desc, Asc
D. Ascending, Descending

14.Select emp_name from department where dept_name like ’ _____ Computer Science’; Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its
A. %
B. _
C. ||
D. %

15._____ operator is used for appending two strings.
A. &
B. %
C. ||
D. &

16.Select * from instructor order by salary ____, name ___; To display the salary from greater to smaller and name in ascending order which of the following options should be used ?
A. UPDATE empdet SET ename = 'Amit' WHERE empno = 1234;
B. DELETE FROM empdet WHERE ename LIKE 'J%';
C. CREATE VIEW empvu AS SELECT* FROM empdept;
D. UPDATE empdet SET ename = 'Amit' WHERE empno = 1234;

17.A non-correlated subquery can be defined as________?
A. A set of sequential queries, all of which must always return a single value
B. A set of sequential queries, all of which must return values from the same table
C. A SELECT statement that can be embedded in a clause of another SELECT statement only
D. A set of sequential queries, all of which must always return a single value

18.Which statements are correct regarding indexes?
A. When a table is dropped, the corresponding indexes are automatically dropped
B. For each DML operation performed, the corresponding indexes are automatically updated
C. A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index
D. When a table is dropped, the corresponding indexes are automatically dropped

19.OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate the statements issued by the DBA in the following sequence:
A. SCOTT would be able to query the OE.ORDERS table
B. SCOTT would not be able to query the OE.ORDERS table
C. The REVOKE statement would remove the SELECT privilege from SCOTT as well as from the role R1
D. SCOTT would be able to query the OE.ORDERS table

20. Evaluate the following statements:
A. It would not display any values
B. It would display the value TWO once
C. It would display the value TWO twice
D. It would not display any values

21.The deadlock in a set of a transaction can be determined by :
A. Read-only graph
B. Wait graph
C. Wait-for graph
D. Read-only graph

22.A deadlock exists in the system if and only if the wait-for graph contains a ___________?
A. Cycle
B. Bi-direction
C. Rotation
D. Cycle

23. A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for another transaction in the set.
A. Idle
B. Deadlock
C. Ready
D. Idle

24. In crabbing protocol locking :
A. Goes down the tree and back up
B. Goes up the tree and back down
C. Goes down the tree and releases
D. Goes down the tree and back up

25.Which SQL function is used to count the number of rows in a SQL query?
A. COUNT()
B. NUMBER()
C. SUM()
D. COUNT()

26.Which SQL keyword is used to retrieve a maximum value?
A. MOST
B. TOP
C. MAX
D. MOST

27.Which of the following SQL clauses is used to DELETE tuples from a database table?
A. DELETE
B. REMOVE
C. DROP
D. DELETE

28._____removes all rows from a table without logging the individual row deletions.
A. DELETE
B. REMOVE
C. DROP
D. DELETE

29.Which of the following is not a DDL command?
A. UPDATE
B. TRUNCATE
C. ALTER
D. UPDATE

30.___ is not a category of SQL command.?
A. TCL
B. SCL
C. DCL
D. TCL


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers