使用phpmyadmin导出mysql数据表结构,开头会出现一些这样的:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
这些 40101开头的是用来做什么用途
巴扎黑2017-04-17 13:20:13
This way of writing is executable comments
, which means that the variable assignment statements inside will be executed.
Why should we write commands in comments? Because your export script may sometimes be executed in other databases.
40101
refers to execution on MySQL 4.1.1 (4.01.01) and above.