Technical :: All Aptitude Test ::

Hassan
1. If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default ____?
A. ASC
B. DESC
C. There is no default value
D. ASC

2.What is the purpose of the SQL AS clause?
A. The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column
B. The AS clause is used with the JOIN clause only
C. The AS clause defines a search condition
D. The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

3.Which of the following is a legal expression in SQL?
A. SELECT NULL FROM SALES;
B. SELECT NAME FROM SALES;
C. SELECT * FROM SALES WHEN PRICE = NULL;
D. SELECT NULL FROM SALES;

4.Which data type can store unstructured data in a column?
A. RAW
B. CHAR
C. NUMERIC
D. RAW

5.Table Employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.
A. 10
B. 9
C. 5
D. 10

6.The SQL statement - SELECT SUBSTR('abcdefghij', INSTR('123321234', '2', 3, 2), 2) FROM DUAL; Prints :
A. gh
B. 23
C. bc
D. gh

7.The SQL statement - SELECT ROUND(45.926, -1) FROM DUAL;
A. is illegal
B. prints garbage
C. prints 045.926
D. is illegal

8.Which of the following must be enclosed in double-quotes?
A. Dates
B. Column Alias
C. Strings
D. Dates

9.Which of the following command makes the updates performed by the transaction permanent in the database?
A. ROLLBACK
B. COMMIT
C. TRUNCATE
D. ROLLBACK

10.A subquery in an SQL SELECT statement is enclosed in:
A. parenthesis -- (...).
B. brackets -- [...].
C. CAPITAL LETTERS.
D. parenthesis -- (...).

11.The result of a SQL SELECT statement is a ______.?
A. file
B. report
C. table
D. file

12. In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:
A. all columns of the table are to be returned.
B. all records meeting the full criteria are to be returned.
C. all records with even partial criteria met are to be returned.
D. all columns of the table are to be returned.

13. The HAVING clause does which of the following?
A. Acts EXACTLY like a WHERE clause.
B. Acts like a WHERE clause but is used for columns rather than groups.
C. Acts like a WHERE clause but is used for groups rather than rows.
D. Acts EXACTLY like a WHERE clause.

14. Which of the following do you need to consider when you make a table in SQL?
A. Data types
B. Primary keys
C. Default values
D. Data types

15.Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
A. Data Definition Language(DDL)
B. Data Manipulation Language(DML)
C. DML and DDL
D. Data Definition Language(DDL)

16.Which of the following is/are the DDL statements?
A. Create
B. Drop
C. Alter
D. Create

17.SQL has how many main commands for DDL:
A. 1
B. 2
C. 3
D. 1

18.Which of the following statement removes database including its related components?
A. DROP DATABASE
B. DELETE DATABASE
C. REMOVE DATABASE
D. DROP DATABASE

19.What is the maximum value that can be stored in NUMERIC(4,2)?
A. 9999.99
B. 99.9999
C. 99.99
D. 9999.99

20. Determine data type for the given column? Column Name: Price ; Description: Cost of an item in rupees and paise ; Example: 200.21
A. VARCHAR2(50)
B. NUMBER
C. NUMBER(5,2)
D. VARCHAR2(50)

21.Determine data type for the given column? Column Name: IFSC_Code ; Description: A 11 Character alphanumeric code that identifies a bank branch ; Example: SBIN0009044 :
A. Char(11)
B. NUMBER
C. VARCHAR2(50)
D. Char(11)

22.Determine the most suitable data type for the given column? Column Name: Profile_Image ; Description: Image of the employee :
A. Clob
B. Blob
C. Varchar(100)
D. Clob

23. The user defined data type can be created using :
A. Create datatype
B. Create data
C. Create definetype
D. Create datatype

24.In contemporary databases, the top level of the hierarchy consists of ______ each of which can contain _____?
A. Catalogs, schemas
B. Schemas, catalogs
C. Alter typeEnvironment, schemas
D. Catalogs, schemas

25. Choose the most suitable data type in case multiple data types are possible for the column. Column Name: PIN_Code ; Description: Six digit numeric PIN code for any address in India ; Example: 560100
A. Integer
B. VARCHAR2(11)
C. CHAR(11)
D. Integer

26.Choose the most suitable data type in case multiple data types are possible for the column. Column Name: Student_id ; Description: Unique number assigned to every Student ; Example: 100000 :
A. Integer
B. VARCHAR2(11)
C. CHAR(11)
D. Integer

27.Choose the most suitable data type in case multiple data types are possible for the column.Column Name: Date_Of_Birth ; Description: Date of Birth of the employee ; Example: 1990/01/01 :
A. Timestamp
B. VARCHAR2(11)
C. Blob
D. Timestamp

28. SQL allows comparison operations on the data types i.e.
A. Date
B. Timestamp
C. Time
D. Date

29.Choose a data type to store weight of a person in kilograms with accuracy of 1 gram. As per wikipedia, Jon Brower Minnoch was the heaviest human ever recorded with a weight of 635kg.
A. NUMBER(3,3)
B. NUMBER(3,2)
C. NUMBER(6,2)
D. NUMBER(3,3)

30.This set of Database Questions & Answers focuses on “SQL Data Types and Schemas” Dates must be specified in the format :
A. mm/dd/yy
B. yyyy/mm/dd
C. dd/mm/yy
D. mm/dd/yy


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