DDL

Q: In SQL, which command(s) is(are) used to change a table’s storage characteristics?
A: ALTER TABLE
Q: Which requirements can be implemented using a CHECK constraint?
A: Both 1 and 2
Q: In a database, what is a foreign key?
A: A data element/attribute within a data field of a data record within a database table that is a primary key in another database table
Q: What is the role of “CONSTRAINS” in defining a table in Mysql?
A: All of the mentioned
Q: Which of the following is the correct syntax for defining “Constraint Check” in MySQL?
A: gender char(1) check( gender IN (‘M’, ‘F’)),
Q: Which of the following is used to delete an entire MYSQL database?
A: drop database dbname
Q: In SQL, which of the following is a data definition language command?
A: RENAME
Q: The___________ defines rules regarding the values allowed in columns and is the standard mechanism for enforcing database integrity.
A: Constraint
Q: Which of the following statements creates a new table-temp instructor that has the same schema as the current instructor?
A: Create table temp_instructor like instructor;
Q: Which of the following is true?
CREATE TABLE Employee3(Emp_id NUMERIC NOT NULL, Name VARCHAR(20) , 
dept_name VARCHAR(20), Salary NUMERIC, UNIQUE(Emp_id,Name));
INSERT INTO Employee3 VALUES(1002, 'Ross', 'CSE', 10000);
INSERT INTO Employee3 VALUES(1006,'Ted','Finance',20000 );
INSERT INTO Employee3 VALUES(1006,'Ross','Finance',20000 );
INSERT INTO Employee3 VALUES(1002,'Ross','Finance',20000 );
A: Error in Line no 6: Duplicate entry