1.

Which of the following MySQL statements is valid if ‘`sampledb`’ is a database and ‘`tbl`’ is a table in it?(a) SELECT * FROM `sampledb.member`(b) SELECT * FROM `sampledb`.`member`(c) SELECT * FROM `member`.`sampledb`(d) SELECT * FROM `member.sampledb`The question was asked in an online quiz.This intriguing question comes from MySQL Identifier Syntax and Naming Rules topic in division Using SQL to Manage Data of MySQL

Answer»

Right choice is (b) SELECT * FROM `sampledb`.`MEMBER`

Explanation: When quotes are being used to refer to a qualified NAME, the individual identifiers are QUOTED within the name separately. So, the database name `sampledb` and table name `TBL` are quoted separately.



Discussion

No Comment Found

Related InterviewSolutions