SQL Database Creation and Data Manipulation Quiz
10 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Explain the purpose of the 'CONSTRAINT DEPTPK PRIMARY KEY (DEPTID)' in the 'DEPARTMENT1' table.

The purpose of the 'CONSTRAINT DEPTPK PRIMARY KEY (DEPTID)' is to define the DEPTID column as the primary key of the DEPARTMENT1 table, ensuring that each DEPTID value is unique and not null.

What is the significance of 'CONSTRAINT CHECKAGE CHECK (AGE BETWEEN 20 AND 60)' in the 'EMPLOYEE' table?

The 'CONSTRAINT CHECKAGE CHECK (AGE BETWEEN 20 AND 60)' ensures that the AGE column in the EMPLOYEE table only allows values between 20 and 60, restricting the entry of invalid age values.

Explain the purpose of 'CONSTRAINT PK_EMPLOYEE PRIMARY KEY (EMPID)' in the 'EMPLOYEE' table.

The 'CONSTRAINT PK_EMPLOYEE PRIMARY KEY (EMPID)' sets the EMPID column as the primary key of the EMPLOYEE table, ensuring that each EMPID value is unique and not null.

What is the function of 'CONSTRAINT FK_EMPLOYEE FOREIGN KEY(DEPTID) REFERENCES DEPARTMENT1(DEPTID)' in the 'EMPLOYEE' table?

<p>The 'CONSTRAINT FK_EMPLOYEE FOREIGN KEY(DEPTID) REFERENCES DEPARTMENT1(DEPTID)' establishes the DEPTID column in the EMPLOYEE table as a foreign key referencing the DEPTID column in the DEPARTMENT1 table, enforcing referential integrity between the two tables.</p> Signup and view all the answers

Explain the purpose of the 'HIREDATE DATE' column in the 'EMPLOYEE' table.

<p>The 'HIREDATE DATE' column in the EMPLOYEE table is used to store the date when an employee was hired, providing a record of the employee's start date within the company.</p> Signup and view all the answers

What are the column names and their data types for the table DEPARTMENT1?

<p>DEPTID INT, DNAME VARCHAR(20), LOC VARCHAR(10), MGRID VARCHAR(20)</p> Signup and view all the answers

What are the details of the employee with EMPID 'E101'?

<p>E101, ANAND, MANAGER, 2018-07-14, 40, 34000, 13</p> Signup and view all the answers

What is the HIREDATE for the employee with EMPID 'E100'?

<p>2016-08-22</p> Signup and view all the answers

List the department names that are located in 'BOMBAY'?

<p>RESEARCH, SALES</p> Signup and view all the answers

What are the constraints associated with the DEPARTMENT1 table?

<p>DEPTPK PRIMARY KEY (DEPTID)</p> Signup and view all the answers

More Like This

SQL Schema and Query Quiz
5 questions

SQL Schema and Query Quiz

BreathtakingUvarovite avatar
BreathtakingUvarovite
Database Server Functions Quiz
10 questions

Database Server Functions Quiz

WellBacklitCherryTree avatar
WellBacklitCherryTree
SQL PRIMARY KEY and CHECK Constraints
27 questions
SQL Statements and Constraints Quiz
10 questions
Use Quizgecko on...
Browser
Browser