98-364 question 51 discussion


You have the database table named Cars as defined below:

You have the following Structured Query Language (SQL) statement:

How many rows are returned by the SQL statement?

  • A. 4
  • B. 5
  • C. 6
  • D. 7
Created 10 months, 2 weeks ago by saad_hassan102000


D is true , A is wrong


A is correct. Try it on SQL Server


The answer is correct, the statements are executed individually, therefore if the first query element is true (c.Origin <> 'USA'), only then will it move onto the second which is again applied separately (c.Color <> 'Black'). On the first query, 2 rows are excluded (The USA rows) and on the second query only 2 remaining Black colors exist which are then excluded also, leaving 4 rows). You should not make statments stating "Try it on SQL Server" without first doing so yourself which would indeed have proved you to be mistaken.


The symbol <> means "not equal to" therefore, A is the right answer


Right answer is A..


beware "<>" and "not" statement dude...


7 rows will be returned since the only record getting eliminated is Convertible-Black-USA


A is correct because of the AND operator.. if the operator is OR then it will return 7 rows.


the key word there is the 'and' in the where clause. both rows should not be USA AND not be black. correct answer is 7


Run it on my local sql and A is correct. Make a table, insert the data and run the select if you don't believe.


The right answer is A! If you want D put OR instead of AND. It was tested on SQL Server. It looks strange but it works.


Está correcta la respuesta es la A lo acabo de probar


A is correct ppl


The answer is A and not D as some might expect. The sql statement does not check both fields for a true value. Instead it steps through origin and color fields one at a time. If AND was replaced with OR it would return 7 rows.