Mysql Multiple Choice Questions

  1. Which command returns current version on MySQL?
    1. SELECT MySQLVERSION();
    2. SELECT VERSION("MySQL");
    3. SELECT VERSION();
    4. All the above
Answer :
C
Explanation:
Added By : Sumit

  1. Which statement is used to connect with mysql server?
    1. mysql -h host_name -u user_name -p password
    2. mysql -u user_name -p password -h host_name
    3. mysql -p password -u user_name -h host_name
    4. All the above
Answer :
D
Explanation:
Added By : Sumit


  1. What is IGNORE keyword in MySQL?
    1. Ignores Primary key or Unique key violations and continues processing with the next row
    2. Ignores Primary key or Unique key violations and leaves any remaining rows unprocessed.
    3. Do not ignores Primary key or Unique key violations
    4. None of the above
Answer :
A
Explanation:
Added By : Sumit

  1. Which is not a valid comment style in MySQL?
    1. # comment
    2. /* comment */
    3. -- comment
    4. //
Answer :
D
Explanation:
Added By : Sumit

  1. What will be the output of this query UPDATE tab_name SET col1 = col1 + 1, col2 = col1;
    1. col1 and col2 have different value
    2. col1 and col2 have same value
    3. col2 has original value of col1
    4. None of the above
Answer :
B
Explanation:
Added By : Sumit

  1. Which is right statement to kill process/thread in MySQL?
    1. KILL ALL thread_id/process_id
    2. KILL thread_id/process_id
    3. REMOVE thread_id/process_id
    4. None of the above
Answer :
B
Explanation:
Added By : Deeksha


  1. How to see currently running queries in MySQL?
    1. SHOW PROCESSLIST;
    2. SHOW FULL PROCESSLIST;
    3. SHOW PROCESSLIST\G
    4. All the above
Answer :
D
Explanation:
Added By : Deeksha

  1. How to set value of "query_cache_size" MYSQL system variable
    1. SET GLOBAL query_cache_size = 41980;
    2. SET GLOBAL VARIABLE query_cache_size = 41980;
    3. SET VARIABLE GLOBAL query_cache_size = 41980;
    4. None of the above
Answer :
A
Explanation:
Added By : Rohit

Social Sharing
Search