Home / Priyanka Tomar / Programming Language MCQs
Programming Portal MCQs [355]
You will find all MCQs which are added in Programming Portal by Priyanka Tomar
Q. If in Table "account", a column "cust_id" consists of {1,2,2,3,3,5,6,7,8,8} then what will be the output on executing the following MySQL statement?
SELECT DISTINICT cust_id
FROM account;
Q. Consider a database name "db_name" whose attributes are intern_id (primary key), subject.
Intern_id = {1, 2, 3, 4, 5, 6}
Subject = {sql, oop, sql, oop, c, c++}
If these are one to one relation then what will be the output of the following MySQL statement?
SELECT intern_id
FROM db_name
WHERE subject IN (c, c++);
Q. Consider a database name "db_name" whose attributes are intern_id (primary key), subject.
Intern_id= {1, 2, 3, 4, 5, 6}
Subject= {sql, oop, sql, oop, c, c++}
If these are one to one relation then what will be the output of the following MySQL statement?
SELECT intern_id
FROM db_name
WHERE subject NOT IN (c, c++);