What are these sql modes for in mysql?

Asked

Viewed 166 times

5

Here is the code:

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

1 answer

0

They are setting flags or settings for the next queries to be executed. They are usually automatically placed while exporting the database to avoid incompatibility or problems in other older versions of Mysql.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.