Consider a database table T containing two columns X and Y each of type integer gate cse 2011

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

gate-cse-2011-->View question

## Consider a database table T containing two columns X and Y each of type integer. -gate-cse-2011

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 and MY, new records are inserted in the table 128 times with X and Y values being 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 are carried out?
SELECT Y FROM T WHERE X=7;
A.127
B.255
C.129
D.257

By:prajwalamv

Taged users:

Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

## You may also like our videos

X = 1, Y = 1 X = 2, Y = 2*1 +1 = 3 X = 3, Y = 2*3 + 1 = 7 X = 4, Y = 2*7 + 1 = 15 X = 5, Y = 2*15 + 1 = 31 X = 6, Y = 2*31+1 = 63 X = 7, Y = 2*63 + 1 = 127
Amogh

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
------------------------------------

### Lets together make the web is a better place

We made eduladder by keeping the ideology of building a supermarket of all the educational material available under one roof. We are doing it with the help of individual contributors like you, interns and employees. So the resources you are looking for can be easily available and accessible also with the freedom of remix reuse and reshare our content under the terms of creative commons license with attribution required close.

You can also contribute to our vision of "Helping student to pass any exams" with these.