Which of the following code blocks will remove the rows where the value in column age is greater than 25 from the existing Delta table my_table and save the updated table?
33 comments · newest first
LA
Larue
10 months ago
Wait, can you really delete like that?
SV
Svetlana
10 months ago
Definitely C, no doubt about it.
SH
Shay
10 months ago
C is the correct answer!
TR
Trina
10 months ago
I think A is a better choice, though.
JU
Julian
10 months ago
B doesn't even make sense for this question!
SU
Sunshine
11 months ago
I feel like option A is just selecting data, not actually removing anything. So, it can't be right, right?
MA
Madonna
11 months ago
I practiced a similar question, and I believe the correct answer is C as well. The others don't seem to fit the requirement of removing rows.
EM
Emerson
11 months ago
I'm not entirely sure, but I remember something about DELETE being used for removing specific rows based on a condition.
LO
Lottie
11 months ago
I think option C is the right choice because it uses DELETE, which is meant for removing rows.
QU
Queenie
12 months ago
I'm a bit unsure about this one. The SELECT statement in option A doesn't seem to actually update the table, it just retrieves the rows. And option E with DELETE WHERE age <= 25 is the opposite of what we want. I'm going to go with C as the best choice.
VE
Veronique
12 months ago
I think option D might also work - UPDATE my_table WHERE age <= 25. That would keep the rows where age is less than or equal to 25 and effectively remove the ones over 25. But C seems more straightforward to me.
BE
Belen
12 months ago
I'm leaning towards option C as well. The DELETE statement seems like the most direct way to remove the rows we don't want and update the table. I just want to double-check that it will save the changes to the Delta table.
MA
Mammie
1 year ago
Hmm, I'm a bit confused. Wouldn't the UPDATE statement in option B also work to remove the rows where age is greater than 25? I'm not sure if that's the best approach though.
EM
Emelda
1 year ago
This looks like a straightforward SQL question. I think the answer is C - DELETE FROM my_table WHERE age > 25. That will remove the rows where the age is greater than 25 and save the updated table.
TO
Torie
1 year ago
I think C is the correct answer because DELETE removes rows from the table.
CR
Crista
1 year ago
C is the winner! I'm just glad we don't have to deal with those old folks anymore. Time to keep the table young and vibrant!
SE
Selene
1 year ago
User 3: Agreed, time to keep the table fresh!
CI
Ciara
1 year ago
User 2: Yeah, let's get rid of those old rows!
TI
Tiera
1 year ago
User 2: Good choice! Let's keep the table fresh and updated.
CO
Cory
1 year ago
User 1: C
LE
Leonie
1 year ago
User 1: C) DELETE FROM my_table WHERE age > 25;
GE
German
1 year ago
I'm not sure, but I think it might be D.
FI
Filiberto
1 year ago
I disagree, I believe the answer is E.
TO
Torie
1 year ago
I think the correct answer is C.
PR
Princess
1 year ago
Hmm, I'm torn between B and C. But I think C is the safer bet since it's a direct delete operation.
PO
Portia
1 year ago
I'm going with C as well. Deleting the rows is the most straightforward way to update the table.
EL
Elliot
1 year ago
C) DELETE FROM my_table WHERE age > 25;
JO
Jose
1 year ago
B) UPDATE my_table WHERE age > 25;
PU
Pura
1 year ago
A) SELECT * FROM my_table WHERE age > 25;
MO
Monroe
1 year ago
Option C is the correct answer. It will delete the rows where the age is greater than 25 from the existing Delta table my_table.
NA
Nana
1 year ago
That makes sense. It will remove the rows we don't need.
CH
Chanel
1 year ago
Yes, you're right. Option C will delete the rows where age is greater than 25.
KA
Kasandra
1 year ago
I think option C is the correct answer.