search

Home  >  Q&A  >  body text

导出的mysql中 /*!40101 SET @OLD_CHARACTER_SET_CLIENT... 用途

使用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开头的是用来做什么用途

迷茫迷茫2782 days ago1113

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑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.

    reply
    0
  • Cancelreply