Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X = 1, Y = 1) is inserted in the table. Let MX and MY denote the respective maximum values of X and Y among all records in the table at any point in time. Using Mx + 1, 2*MY + 1 respectively. It may be noted that each time after the insertion, values of MX and MY change. What will be the output of the following SQL query after the steps mentioned above the carried out?
    SELECT Y FROM T WHERE X = 7;
    1. 127
    2. 255
    3. 190
    4. 257
Correct Option: A

XY
11
23
37
415
531
663
7127

For X= 7 ⇒ Y = 127



Your comments will be displayed only after manual approval.