Mysql Basic


  1. Which of the following statements is valid if ‘`sampledb`’ is a database and ‘`tbl`’ is a table in it?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    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.


  1. If no database has been selected, specifying a database qualifier is necessary.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    When no database has been selected, not specifying the database qualifier would be confusing. A table cannot be referred to if the database qualfier is absent, since it would be unclear as to which database it belongs to.



  1. What does a fully qualified table name consist of?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    MySQL identifiers use qualifiers. An element of a database has a fully qualified name. A database table in MySQL has the fully qualified name as the database name followed by the table name.


  1. What is the maximum length for alias names in terms of characters?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The identifiers in MySQL have a maximum length of 64 characters. However, the alias names for identifiers can have the number of characters up to 256. Aliases can also be quoted or unquoted.



  1. Which server mode value disables use of built in function names as identifiers?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The Server SQL mode value ‘IGNORE_FUNC’ is used to restrict the identifier naming conventions. When this is enabled, the names of built in functions can no longer be used as identifiers.