Top MySQL Interview Questions and Answers

The top MySQL Interview Questions and Answers are given here. The level of questions is suitable for beginners as well as advanced database developers.

Let’s begin!

Ques 1. Which MySQL Statement is used to create a new database?

  • CREATE DB Statement
  • CREATE DBS Statement
  • CREATE DATABASE Statement
  • ADD DBASE Statement

Ques 2. Which MySQL Statement is used to create a new table?

  • CREATE TABLE Statement
  • CREATE TB Statement
  • ADD TABLE Statement
  • ADD NEW Statement

Ques 3. Which MySQL Statement is used to select records?

  • SELECT Statement
  • SELECT RECORDS Statement
  • SELECT REC Statement
  • SELECT RECORD Statement

Ques 4. Which MySQL Statement is used to select and return only distinct values from a table?

  • SELECT VALUES Statement
  • SELECT Statement
  • DISTINCT Statement
  • SELECT DISTINCT Statement

Ques 5. Which MySQL Statement is used to insert records in a table?

  • INSERT INTO Statement
  • INSERT Statement
  • INSERT RECORDS Statement
  • INSERT VALUES Statement

Ques 6. How to fetch all records from a table “Employee”

  • SELECT INTO FROM Employee
  • SELECT ALL FROM Employee
  • SELECT ** FROM Employee
  • SELECT * FROM Employee

Ques 7. How to order a column “Salary” in Descending Order in MySQL?

  • order by Salary;
  • order by Salary DESC;
  • order Salary DESC;
  • order Salary;

Ques 8. Which MySQL Operator is used to display records only if both conditions are TRUE?

  • OR Operator
  • NOT Operator
  • Like Operator
  • AND Operator

Ques 9. Which MySQL Operator is used to display records only if any one of the conditions is TRUE?

  • Like Operator
  • IN Operator
  • OR Operator
  • AND Operator

Ques 10. How to select all the records from a table named “Employee” where “Salary” is not 5000?

  • select * from Employee where Salary!=5000;
  • select * from Employee where not Salary=5000;
  • select * from Employee where Salary~=5000;
  • None of the above

Ques 11. Which MySQL Operator is used to find values in a range?

  • RANGE Operator
  • BETWEEN Operator
  • RANGE_VALUES Operator
  • None of the above

Ques 12. Which MySQL function is used to count the number of rows?

  • COUNT() Function
  • ROWNUM() Function
  • ROWNUMBER() Function
  • COUNT_ROW() Function

Ques 13. Can a Primary Key Column have NULL values?

  • Yes
  • No

Ques 14. A child table is a table with a __________ key?

  • Foreign Key
  • Primary Key

Ques 15. Which statement in MySQL is used to add, delete or modify columns in an existing table?

  • MODIFY TABLE Statement
  • ALTER TABLE Statement
  • TRUNCATE TABLE Statement
  • None of the Above

If you find the MySQL Interview Questions & Answers, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

MySQL Examples
MySQL Online Quiz
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading