1.

Which statement 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 posed to me during an interview.Asked question is from Using Multiple-Statement Execution topic in section MySQL Programs Using C of MySQL

Answer»

Correct OPTION is (B) SELECT * FROM `sampledb`.`member`

For explanation: When quotes is 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