Interview :: MySQL
MySQL default port number is 3306.
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 for .txt files to list all text files in the file manager. The regex equivalent for .txt will be .*\.txt.
You can a create maximum of 16 indexed columns for a standard table.
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.
SELECT * FROM table_name LIMIT 0,20;
If you want to display the current date and time, use -
SELECT NOW();
If you want to display the current date only, use:
SELECT CURRENT_DATE();
A defined point in any transaction is known as savepoint.
SAVEPOINT is a statement in MySQL, which is used to set a named transaction savepoint with the name of the identifier.
SQLyog program is the most popular GUI tool for admin. It is the most popular MySQL manager and admin tool. It combines the features of MySQL administrator, phpMyadmin, and others. MySQL front ends and MySQL GUI tools.
It is easy to back up data with phpMyAdmin. Select the database you want to backup by clicking the database name in the left-hand navigation bar. Then click the export button and make sure that all tables are highlighted that you want to back up. Then specify the option you want under export and save the output.
The =, <>, <=, <, >=, >, <<, >>, < = >, AND, OR or LIKE operator are the comparison operators in MySQL. These operators are generally used with SELECT statement.