MySQL Interview Questions – Set 14

Write a query to select all teams that won either 1, 3, 5, or 7 games. SELECT team_name FROM team WHERE team_won IN (1, 3, 5, 7); What is the difference between MySQL and SQL? SQL is known as the standard query language. It is used to interact with the database like MySQL. MySQL is a … Read more

MySQL Interview Questions – Set 13

How to join three tables in MySQL? Sometimes we need to fetch data from three or more tables. There are two types available to do these types of joins. Suppose we have three tables named Student, Marks, and Details. Let’s say Student has (stud_id, name) columns, Marks has (school_id, stud_id, scores) columns, and Details has … Read more

MySQL Interview Questions – Set 12

What is the difference between the heap table and the temporary table? Heap tables: Heap tables are found in memory that is used for high-speed storage temporarily. They do not allow BLOB or TEXT fields. Heap tables do not support AUTO_INCREMENT. Indexes should be NOT NULL. Temporary tables: The temporary tables are used to keep … Read more

MySQL Interview Questions – Set 11

How can we run batch mode in MySQL? To perform batch mode in MySQL, we use the following command: mysql; mysql mysql.out; In which language MySQL has been written? MySQL is written in C and C++, and its SQL parser is written in yacc. How to install MySQL? Installing MySQL on our system allows us … Read more

MySQL Interview Questions – Set 10

How to change the table name in MySQL? Sometimes our table name is non-meaningful. In that case, we need to change or rename the table name. MySQL provides the following syntax to rename one or more tables in the current database: mysql> RENAME old_table TO new_table; If we want to change more than one table name, use … Read more

MySQL Interview Questions – Set 09

What is the difference between NOW() and CURRENT_DATE()? NOW() command is used to show current year, month, date with hours, minutes, and seconds while CURRENT_DATE() shows the current year with month and date only. What are the different column comparison operators in MySQL? The =, , <=, =, >, <>, , AND, OR or LIKE … Read more

MySQL Interview Questions – Set 08

What is MySQL data directory? MySQL data directory is a place where MySQL stores its data. Each subdirectory under this data dictionary represents a MySQL database. By default, the information managed my MySQL = server mysqld is stored in the data directory. How to clear screen in MySQL? If we use MySQL in Windows, it … Read more

MySQL Interview Questions – Set 07

What are the security alerts while using MySQL? Install antivirus and configure the operating system’s firewall. Never use the MySQL Server as the UNIX root user. Change the root username and password Restrict or disable remote access. What is the difference between the database and the table? There is a major difference between a database … Read more

MySQL Interview Questions – Set 06

What is REGEXP? REGEXP is a pattern match using a regular expression. The regular expression is a powerful way of specifying a pattern for a sophisticated search. Basically, it is a special text string for describing a search pattern. To understand it better, you can think of a situation of daily life when you search … Read more

MySQL Interview Questions – Set 05

How will Show all records containing the name “sonia” AND the phone number ‘9876543210’ mysql> SELECT * FROM tablename WHERE name = “sonia” AND phone_number = ‘9876543210’ How to Update database permissions/privilages. mysql> flush privileges; how to Return total number of rows mysql> SELECT COUNT(*) FROM tablename; How to dump one database for backup. # … Read more