Technical :: All Aptitude Test ::

Hassan
1.Values of one type can be converted to another domain using which of the following ?
A. Cast
B. Drop type
C. Alter type
D. Cast

2.Many current-generation database applications need to store photographs, or of the order megabytes and gigabytes using :
A. Large-index type
B. Large-object type
C. Large-location type
D. Large-index type

3.Current date is returned by the method :
A. system.date
B. current.date
C. machine.date
D. system.date

4.Data types in SQL Server are organized into how many categories?
A. 6
B. 7
C. 8
D. 6

5.An index helps to speed up?
A. SELECT queries
B. WHERE clauses
C. Both A and B
D. SELECT queries

6.Which of the following is correct CREATE INDEX Command?
A. INSERT INDEX index_name ON table_name;
B. INSERT INDEX index_name ON database_name;
C. CREATE INDEX index_name ON database_name;
D. INSERT INDEX index_name ON table_name;

7. A _______ index is an index on two or more columns of a table.
A. Implicit
B. Unique
C. single-column
D. Implicit

8. To combine multiple retrievals, we write several SELECT statements and put the keyword between them. What is the keyword?
A. COMBINE
B. CONCAT
C. JOIN
D. COMBINE

9. What is xyz in the following SQL statement? SELECT xyz FROM table1 UNION xyz FROM table2;
A. row name
B. column name
C. table name
D. row name

10.Which of the following statements are TRUE regarding subqueries?
A. A subquery can retrieve zero or more rows
B. A subquery can appear on either side of a comparison operator
C. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement
D. A subquery can retrieve zero or more rows

11.Which of the following statement(s) is TRUE regarding subqueries?
A. Inner queries in WHERE clause can contain ORDER BY
B. Outer query and inner query can get data from different tables
C. Outer query and inner query must get data from the same table
D. Inner queries in WHERE clause can contain ORDER BY

12.Which ACID property specifies that once the transaction is committed, its permanent even in case of power failures?
A. Atomicity
B. Consistency
C. Isolation
D. Atomicity

13. Where subqueries can not be used?
A. Field names in the SELECT statement
B. The WHERE clause only in the SELECT statement
C. The WHERE clause in SELECT as well as all DML statements
D. Field names in the SELECT statement

14.Select * from student join takes using (ID); The above query is equivalent to ____________?
A. Select * from student inner join takes using (ID);
B. Select * from student outer join takes using (ID);
C. Select * from student left outer join takes using (ID);
D. Select * from student inner join takes using (ID);

15.The ______ construct returns true if a given tuple is present in the subquery.
A. not exists
B. present
C. not present
D. not exists

16.NULL is :
A. the same as 0 for integer
B. the same as blank for character
C. the same as 0 for integer and blank for character
D. the same as 0 for integer

17.The predicate in a where clause can involve Boolean operations such as and.The result of true and unknown is_______ false and unknown is _____ while unknown and unknown is _____?
A. Unknown, unknown, false
B. True, false, unknown
C. True, unknown, unknown
D. Unknown, unknown, false

18.This SQl query selects :
A. Tuples with null value
B. Tuples with no null values
C. Tuples with any salary
D. Tuples with null value

19.In a employee table to include the attributes whose value always have some value which of the following constraint must be used ?
A. Null
B. Not null
C. Unique
D. Null

20.Using the ______ clause retains only one copy of such identical tuples.
A. Null
B. Unique
C. Not null
D. Null

21.Some of these insert statements will produce an error. Identify the statement.
A. Insert into employee values (1005,Rach,0);
B. Insert into employee values (1002,Joey,335);
C. Insert into employee values (1007,Ross, );
D. Insert into employee values (1005,Rach,0);

22.You attempt to query the database with this command:
A. The expression attempts to divide by a null value
B. The data types in the conversion function are incompatible
C. The character string none should be enclosed in single quotes (‘ ‘)
D. The expression attempts to divide by a null value

23.The result of _____unknown is unknown.
A. Xor
B. Or
C. And
D. Xor

24.Aggregate functions are functions that take a ___________ as input and return a single value.
A. Collection of values
B. Single value
C. Aggregate value
D. Collection of values

25.If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression.
A. Distinct
B. Count
C. Avg
D. Distinct

26.A Boolean data type that can take values true, false, and________?
A. 1
B. 0
C. Null
D. 1

27.The phrase “greater than at least one” is represented in SQL by _____?
A. < all
B. < some
C. > all
D. < all

28.This statement is erroneous because :
A. Avg(salary) should not be selected
B. Dept_id should not be used in group by clause
C. Misplaced group by clause
D. Avg(salary) should not be selected

29.SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
A. Group by
B. With
C. Where
D. Group by

30.Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
A. Where, having
B. Having, where
C. Group by, having
D. Where, having


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