DML
DDL
DCL
TCL
10

TABLE enrollments  

(id INTEGER NOT NULL PRIMARY KEY  ,

year INTEGER NOT NULL ,

studentId INTEGER NOT NULL);

update enrollments set year='2015';

10

The _____ command is used to modify columns in a table

alter

10

DCL stands for

DCL stands for Data Control Language.

10

TCL stands for

TCL for Transaction control languages.

20

TABLE dogs (id INTEGER NOT NULL PRIMARY KEY,  name VARCHAR(50) NOT NULL);

TABLE cats ( id INTEGER NOT NULL PRIMARY KEY,  name VARCHAR(50) NOT NULL);

select name from dogs union select distinct name from cats;

20

What is a tuple?

A tuple is a single record or single row in a table.

20

_________commands in SQL allow controlling access to data within database.

Data control is used for the controlling the access to database.

20

which are TCL queries

Commit, rollback, savepoint

30

STUDENTS(student_code, first_name, last_name, email,          phone_no, date_of_birth, honours_subject, percentage_of_marks);


Write a query to display names of all the students whose email ids are not provided?

 select first_name, last name from students where email is null;

30

What is the basic unit of storage in Database that contains data?

Table

30

A transaction completes its execution is said to be

 A transaction the completes its execution is said to be Committed.

30

Full form of ACID property for transaction management 

Atomicity, Consistency, Isolation and Durability

40

Which of the following statements are TRUE about an SQL query? P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause R : All attributes used in the GROUP BY clause must appear in the SELECT clause S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause

P and S

According to standard SQL answer should be option (C) which is answer key given by GATE authority. If we talk about different SQL implementations like MySQL, then option (B) is also right. But in question they seem to be talking about standard SQL not about implementation. For example below is a P is correct in most of the implementations. HAVING clause can also be used with aggregate function. If we use a HAVING clause without a GROUP BY clause, the HAVING condition applies to all rows that satisfy the search condition. In other words, all rows that satisfy the search condition make up a single group. See this for more details. S is correct . To verify S, try following queries in SQL.

40

What is the full form of DDL in  DB

Data definition Language query
40

 Which of the following keyword is used with Data Control Language (DCL) statements?
a) SELECT
b) INSERT
c) DELETE
d) GRANT

GRANT is the keyword which is used with Data Control Language statements.

40

What is the rule of Transaction

The rule of transaction tells that either all the statements in the transaction should be executed successfully or none of those statements to be executed.

50

A type of query that is placed within a WHERE or HAVING clause of another query is called

Sub-query that is placed within a WHERE or HAVING clause of another query.

50

 A Database Language Concerned With The Definition Of The Whole Database Structure And Schema Is ________

 Data Definition Language is used for the to define the data structure of the Table.

50

 DCL Provides Commands To Perform Actions Like _____________

 DCL is used to perform the action like authorization, Access and other control over database.

50

what is meaning of savepoint query 

A SAVEPOINT is a point in a transaction when you can roll the transaction back to a certain point without rolling back the entire transaction.