Database :: All Aptitude Test ::

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

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

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

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

5. 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

6.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

7.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;

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

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

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

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

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

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

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

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

16. 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.

17. 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.

18. 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

19.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)

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

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

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

23.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

24. 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)

25.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)

26.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

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

28.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

29. 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

30.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


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