GATEverse
← GATE IT 2004

Q78

MCQ2 marks, −0.5

Consider two tables in a relational database with columns and rows as follows:

\overset{\text{Table: Student}}{\begin{array}{|c|c|c|} \hline \textbf {Roll_no} & \textbf{Name} & \textbf{Dept_id} \\\hline 1& \text{ABC} & 1\\\hline 2& \text{DEF} & 1 \\\hline 3 & \text{GHI} & 2\\\hline 4 & \text{JKL} & 3\\\hline \end{array}} \qquad \overset{\text{Table: Department}}{\begin{array}{|c|c|c|} \hline \textbf {Dept_id} & \textbf{Dept_name} \\\hline 1& \text{A} \\\hline 2& \text{B} \\\hline 3 & \text{C} \\\hline \end{array}}

Roll_no is the primary key of the Student table, Dept_id is the primary key of the Department table and Student.Dept_id is a foreign key from Department.Dept_id What will happen if we try to execute the following two SQL statements? Both i and ii will fail i will fail but ii will succeed i will succeed but ii will fail Both i and ii will succeed

Sign in to save attempts.

Loading…