Mysql miscellaneous


  1. Which string function returns the index of the first occurrence of substring?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The string funtion ‘INSTR()’ is used to return the index of the first occurrence of the substring. The function ‘INSERT()’ is used to insert a substring at the specified position up to the specified number of characters.


  1. Which system variable when set to 1, makes all temporary tables to get stored on disk rather than in memory?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The variable ‘big_tables’ if set to 1, all temporary tables are stored on disk rather than in memory. This is a little slower but the error ‘The table tbl_name is full’ does not occur for SELECT operations that require a large temporary table.



  1. The permitted value type for the variable ‘character_set_client’ is _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ‘character_set_client’ is the character set for statements that arrive from the client. The session value of this variable is set using the character set requested by the client when client connects to server.


  1. ‘character_set_database’ represents the character set used by the default database.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    ‘character_set_database’ is the character set used by the default database. The server sets the variable whenever the default database changes. If there is no default database the variable has the same value as ‘character_set_server’.



  1. The string function that returns the index of the first occurrence of substring is _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The string funtion ‘INSTR()’ is used to return the index of the first occurrence of the substring. The function ‘INSERT()’ is used to insert a substring at the specified position up to the specified number of characters.