Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2011
Questions

Q32

MCQ2 marks, −0.67DatabasesMedium

Consider a database table T containing two columns X\text{X} and Y\text{Y} each of type integer\text{integer}. After the creation of the table, one record (X=1, Y=1)\text{(X=1, Y=1)} is inserted in the table. Let MX\text{MX} and MY\text{MY} denote the respective maximum values of X\text{X} and Y\text{Y} among all records in the table at any point in time. Using MX\text{MX} and MY\text{MY}, new records are inserted in the table 128128 times with X\text{X} and Y\text{Y} values being MX+1, 2*MY+1\text{MX+1, 2*MY+1} respectively. It may be noted that each time after the insertion, values of MX\text{MX} and MY\text{MY} change. What will be the output of the following SQL query after the steps mentioned above are carried out?

SELECT Y FROM T WHERE X=7;
Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.