Mysql miscellaneous
- Which string function returns the index of the first occurrence of substring?
-
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.
- Which system variable when set to 1, makes all temporary tables to get stored on disk rather than in memory?
-
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.
- The permitted value type for the variable ‘character_set_client’ is _____________.
-
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.
- ‘character_set_database’ represents the character set used by the default database.
-
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’.
- The string function that returns the index of the first occurrence of substring is _____________.
-
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.