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?

Ask 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

Talk about thisDelete|Like|Dislike|

You may also like our videos



Answers

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
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------


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.
Answer a question: You can answer the questions not yet answered in eduladder.
Career: Work or do your internship with us.
Create a video: You can teach anything and everything each video should be less than five minutes should cover the idea less than five min.
Donate: Ad revenue alone is not able to take care of our server cost consider donating at least a dollar Click here to donate.

If you want the help of doing any of these never hesitate to drop an email to me arunwebber[at]gmail[dot]com, Or you can ping us on WhatsApp ph: 8147433408

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!