1-Which statement would add a column CGPA to a table Student which is already created?
- ALTER TABLE Student ADD COLUMN (CGPA NUMBER(3,1));
- ALTER TABLE Student CGPA NUMBER(3,1);
- ALTER TABLE Student ADD (CGPA NUMBER(3,1));
- ALTER TABLE Student ADD CGPA NUMBER(3,1);
2- Which statement is TRUE regarding ALTER statement?
- ALTER TABLE cannot be used to remove a column
- ALTER table can be used to change data type of an existing column if column values are empty
- ALTER table can be used to change size of data type, not the data type itself
- ALTER table can be used to add a column but it must be NOT NULL
3-Student Table
Which of the following statements will execute successfully?
- INSERT INTO Student VALUES(1, ‘Alice’, ‘Female’, ’20-JAN-15′);
- INSERT INTO Student VALUES(1, “Alice”, ‘F’, SYSDATE);
- INSERT INTO Student VALUES(1, ‘Alice’, ‘F’, ‘2015-JAN-20’);
- INSERT INTO Student VALUES(1, ‘Alice’, ‘F’, NULL);
4- Student Table
Which of the following statements will execute successfully?
- INSERT INTO Student(Id, Name, Gender, DOJ) VALUES(1, ‘Alice’, ‘F’, NULL);
- INSERT INTO Student(Id, Gender) VALUES( 1, ‘F’);
- INSERT INTO Student(Id, Name) VALUES(1, ‘Alice’);
- INSERT INTO Student(Id, Name, Gender, DOJ) VALUES (1,NULL, ‘F’, ’20-JAN-15′);
5-Which of the following command displays distinct rows?
- UNION
- UNION ALL
6-Which of the following statement(s) is/are FALSE about UNION? [Choose any TWO]
- Column Names in all queries in a UNION must match position wise
- UNION can be used with UPDATE statement
- Data Types in all queries in a UNION must match position wise
- The number of columns must match in the query
7-Which of the following statement is TRUE about UNION?
- Each query in a UNION can be sorted independently in different sort orders
- All the queries in a UNION must be against the same table
- UNION clause is used to subtract rows of second query from the first query
- UNION and UNION ALL give same result if the participating queries are mutually exclusive
8-Which of the following statement is TRUE about Group By clause?
- Columns specified in GROUP BY clause must be part of the SELECT clause
- Columns specified in SELECT clause must be part of the GROUP BY clause
- GROUP BY removes NULL values from result
- Aggregate function cannot be used in query containing GROUP BY
9-In which of the following circumstances a GROUP BY clause is mandatory?
- SELECT query having only one aggregate function
- SELECT query having two aggregate functions
- SELECT query having one aggregate function along with other columns
- SELECT query having only two columns
10-A query that has a nested aggregate function
- must have a GROUP BY clause
- may or may not have a GROUP BY clause
- must not have a GROUP BY clause
- would not work
11-Relation R1 has 10 tuples and 5 attributes. Relation R2 has 0 tuples and 7 attributes. When a ‘CROSS JOIN’ is achieved between R1 and R2, how many tuples would the resultant set have?
- 28
- 10
- 0
- 35