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
How To Pass 98-364 Exam?FULL Printable PDF and Software. VALID exam to help you PASS. |
A is correct
create table t1
(
stype varchar(100),
scolor varchar(100),
sorigin varchar(100)
)
insert into t1 values (‘Sedan’,’Red’,’Japan’);
insert into t1 values (‘Truck’,’Red’,’USA’);
insert into t1 values (‘Minivan’,’Silver’,’Japan’);
insert into t1 values (‘hback’,’Red’,’Japan’);
insert into t1 values (‘copmact’,’Black’,’Japan’);
insert into t1 values (‘SUV’,’Silver’,’Germany’);
insert into t1 values (‘convertible’,’Black’,’USA’);
insert into t1 values (‘hybrid’,’Black’,’Germany’);
select * from t1 c where c.sorigin ‘USA’ and c.sColor ‘Black’
Answer is D) = 7
only 1 row is “black” and “USA”, then 8 rows – 1 row = 7 rows
A is correct.
” means not equal to. Can also be written as ‘!=’
Therefore only four rows have values without either ‘Black’ or ‘USA’ in them.
Should be a in the first quotes.
Not accepting the greater than/ less than signs for some reason. But you know what I mean.
A’ and B’ = (A or B)’ so the answer is A
Correct Answer: A
There are 3 black cars (one from USA) AND another car from USA, making it 4 cars altogether.
Correct answer: D
means not from USA
AND
means not Black
= 7
CORRECT ANSWER : A is the correct answer. Don’t Listen to Mateusz!
Answer should be 7. Out of 8 rows, only one fits the condition ( not black and not from usa simultanously)
logicly Mateusz is right. but sql logic is different. if you use AND any condition filter records. so A is correct. you can try 🙂