Free COMPTIA Datasys+ DS0-001 Actual Exam Questions - Question 8 Discussion
Maybe D isn’t wrong technically, it just doesn’t filter anything but the syntax is fine. I see the point about C’s missing space, but most SQL engines are pretty forgiving with that and treat SELECT* as SELECT *. So B definitely stands out since it’s missing the FROM clause completely, which is required for a valid query. That one can’t run at all, so that’s where I’d put the error.
B/D? B misses FROM, so that’s an obvious error. D is technically correct syntax but might be pointless without a WHERE clause if the question implies filtering. Still, B is clearly wrong.
A imo is fine syntactically even if EmpId doesn’t exist for 90030, it won’t cause an error, just return no rows. B is the only one missing FROM, so definitely the error here.
Maybe B is the error since it’s missing the FROM clause, which is essential for a valid SELECT query. The others at least have the basic structure right.
B imo misses FROM, so it’s definitely wrong syntax here.
It’s B, no FROM clause means it won’t run properly.
A imo is fine since it has both SELECT and FROM with a valid WHERE clause. B clearly misses FROM, so it stands out as wrong while others look okay.
I think B has the error because it’s missing the FROM clause after SELECT EmpId. You need to specify the table before the WHERE condition.