When you try the Navicat tool to view the current MySQL build table statement, it is found that the table name and field names are quoted in reverse quotation marks.
CREATE TABLE ' Tab_notice_title_tv ' ( ' i_id ' int (one) not NULL auto_increment, ' c_opcom_key ' varchar (+) DEFAULT NULL, ' c_view_type ' int (one) default ' 1 ' COMMENT ' platform type, 1: SD, 2: HD ', ' c_title ' varchar (+) default NULL, ' c_ Status ' int (2) Default ' 0 ', ' c_creator ' varchar (+) Default ', ' c_createtime ' varchar (+) default NULL, ' C _deleted ' int (2) not NULL default ' 0 ', PRIMARY KEY (' i_id ')) Engine=myisam auto_increment=46 default CHARSET=GBK;
Anti-quotes, usually below the ESC key.
It is a symbol that is introduced to differentiate between MySQL's reserved words and ordinary characters.
For example: Select ' Select ' From ' Test ' WHERE select= ' field value '
In the test table, there is a select field, without the use of anti-quotes, MySQL will treat select as a reserved word resulting in an error, so there is a MySQL reserved word as a field, you must add the anti-quote to distinguish.
Quotation marks are generally used in the value of the field, and if the field value is a character or string, enclose it in quotation marks, such as: select= ' field value '
Tables built without anti-quotes cannot contain mysql reserved words, otherwise an error occurs
The name of the anti-quote, this is actually to prevent when the field is a keyword, with this symbol can not be an error
CREATE TABLE ' zz_files ' ( ' id ' int (one) unsigned not null auto_increment, ' data_id ' int (one) ' DEFAULT NULL, ' Nam E ' varchar (COLLATE) utf8_unicode_ci default null, ' fileurl ' varchar (+) COLLATE utf8_unicode_ci default NULL, ' ext ' varchar COLLATE utf8_unicode_ci DEFAULT NULL COMMENT ' extension ', ' cate ' varchar (in) COLLATE Utf8_unicode_ CI default null, ' desc ' int (one) default null, ' c_time ' int (one) default null, PRIMARY KEY (' id ')) engine=myisa M auto_increment=12 DEFAULT Charset=utf8 collate=utf8_unicode_ci
As with the DESC keyword, this symbol will not go wrong.
Reference links
Http://blog.163.com/[email protected]/blog/static/66693350201721651918235/
(ext.) The effect of anti-quotation marks when MySQL creates a table