{"id":1073,"date":"2020-09-09T09:45:44","date_gmt":"2020-09-09T01:45:44","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=1073"},"modified":"2022-09-13T16:18:57","modified_gmt":"2022-09-13T08:18:57","slug":"gbase-8a-%e5%9c%a8v95%e7%89%88%e6%9c%ac%e5%af%b9%e8%a1%a8%e8%87%aa%e5%a2%9e%e5%88%97%e7%9a%84%e6%94%af%e6%8c%81%e6%a0%b7%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/1073","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a \u5728V95\u7248\u672c\u5bf9\u8868\u81ea\u589e\u5217auto_increment\u7684\u652f\u6301\u6837\u4f8b"},"content":{"rendered":"<p>GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\uff0c\u4ece\u4e00\u5f00\u59cb\u5c31\u4e0d\u652f\u6301\u4e3b\u952e\uff0c\u5916\u952e\uff0c\u552f\u4e00\u952e\u7b49\uff0c\u540c\u65f6\u56e0\u4e3a\u6280\u672f\u539f\u56e0\uff0c\u4e5f\u6ca1\u6709\u652f\u6301\u81ea\u589e\u5217\u3002 \u5728V95\u7248\u672c\u91cc\uff0c\u7b2c\u4e00\u6b21\u6b63\u5f0f\u652f\u6301\u4e86\u81ea\u589e\u5217\uff0c\u4f46\u4e5f\u6709\u4e00\u4e9b\u9650\u5236\uff0c\u7279\u522b\u662f\u4e0d\u4fdd\u8bc1\u6570\u503c\u8fde\u7eed\u3002\u5982\u679c\u7528\u6237\u975e\u5e38\u5173\u5fc3\u8fde\u7eed\u6027\uff0c\u8bf7\u5728\u539f\u59cb\u6570\u636e\u91cc\u5305\u542b\u8ba1\u7b97\u597d\u7684\u5217\u503c\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b2c9c2c55b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b2c9c2c55b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E5%8F%82%E8%80%83\" >\u53c2\u8003<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E8%87%AA%E5%A2%9E%E5%88%97%E5%85%B3%E9%94%AE%E5%AD%97_auto_increment\" >\u81ea\u589e\u5217\u5173\u952e\u5b57 auto_increment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E9%9B%86%E7%BE%A4%E8%A7%84%E6%A8%A1\" >\u96c6\u7fa4\u89c4\u6a21<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#insert_value%E6%8F%92%E5%85%A5%E6%95%B0%E6%8D%AE\" >insert value\u63d2\u5165\u6570\u636e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E8%8E%B7%E5%BE%97%E8%87%AA%E5%A2%9E%E5%88%97%E7%9A%84%E5%80%BC\" >\u83b7\u5f97\u81ea\u589e\u5217\u7684\u503c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#load_%E5%8A%A0%E8%BD%BD%E6%96%B9%E5%BC%8F%E5%85%A5%E5%BA%93\" >load \u52a0\u8f7d\u65b9\u5f0f\u5165\u5e93<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E5%8A%A0%E8%BD%BD%EF%BC%8C%E7%9C%8B%E7%BB%93%E6%9E%9C\" >\u52a0\u8f7d\uff0c\u770b\u7ed3\u679c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E6%9E%84%E9%80%A0%E4%B8%8D%E6%98%AF3%E7%9A%84%E6%95%B4%E5%80%8D%E6%95%B0%E7%9A%84%E6%95%B0%E6%8D%AE%EF%BC%8C%E5%8A%A0%E8%BD%BD%E5%A4%9A%E6%AC%A1\" >\u6784\u9020\u4e0d\u662f3\u7684\u6574\u500d\u6570\u7684\u6570\u636e\uff0c\u52a0\u8f7d\u591a\u6b21<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.gbase8.cn\/en\/1073\/#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9\" >\u6ce8\u610f\u4e8b\u9879<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83\"><\/span>\u53c2\u8003<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.gbase8.cn\/en\/10012\/\">GBase 8a\u81ea\u589e\u5217\u4e0d\u5141\u8bb8insert\u62a5\u9519auto_increment column should not be specified in insert<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%87%AA%E5%A2%9E%E5%88%97%E5%85%B3%E9%94%AE%E5%AD%97_auto_increment\"><\/span>\u81ea\u589e\u5217\u5173\u952e\u5b57 auto_increment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5982\u4e0b\u662f\u4e00\u4e2a\u6d4b\u8bd5\u8868\uff0c\u5176\u4e2d\u81ea\u589e\u5217\uff0c\u6bd4\u5982\u662f\u4e00\u4e2a\u4e3b\u952e \uff0c\u6240\u4ee5\u8981\u548c primary key auto_increment \u4e00\u8d77\u4f7f\u7528\u3002\u5426\u5219\u4f1a\u62a5\u9519\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase&gt; create table t_autoinc(id int primary key auto_increment, name varchar(100));\nQuery OK, 0 rows affected (Elapsed: 00:00:00.83)\n\ngbase&gt; show create table t_autoinc;\n+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table     | Create Table                                                                                                                                                                                  |\n+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| t_autoinc | CREATE TABLE \"t_autoinc\" (\n  \"id\" int(11) NOT NULL AUTO_INCREMENT,\n  \"name\" varchar(100) DEFAULT NULL,\n  PRIMARY KEY (\"id\")\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' |\n+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; create table t_autoinc(id int auto_increment, name varchar(100));\nERROR 1050 (42S01): Table 't_autoinc' already exists\ngbase&gt; create table t_autoinc2(id int auto_increment, name varchar(100));\nERROR 1702 (HY000): gcluster table error: Incorrect table definition; there can be only one auto column and it must be defined as a key.\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E9%9B%86%E7%BE%A4%E8%A7%84%E6%A8%A1\"><\/span>\u96c6\u7fa4\u89c4\u6a21<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u662f3\u4e2a\u8282\u70b9<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;gbase@localhost ~]$ gcadmin\nCLUSTER STATE:         ACTIVE\nVIRTUAL CLUSTER MODE:  NORMAL\n\n=============================================================\n|           GBASE COORDINATOR CLUSTER INFORMATION           |\n=============================================================\n|   NodeName   | IpAddress  | gcware | gcluster | DataState |\n-------------------------------------------------------------\n| coordinator1 | 10.0.2.102 |  OPEN  |   OPEN   |     0     |\n-------------------------------------------------------------\n| coordinator2 | 10.0.2.202 |  OPEN  |   OPEN   |     0     |\n-------------------------------------------------------------\n| coordinator3 | 10.0.2.203 |  OPEN  |   OPEN   |     0     |\n-------------------------------------------------------------\n=========================================================================================================\n|                                    GBASE DATA CLUSTER INFORMATION                                     |\n=========================================================================================================\n| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |\n---------------------------------------------------------------------------------------------------------\n|  node1   |                10.0.2.102                |       3        | OPEN  |    OPEN    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node2   |                10.0.2.202                |       3        | OPEN  |    OPEN    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node3   |                10.0.2.203                |       3        | OPEN  |    OPEN    |     0     |\n---------------------------------------------------------------------------------------------------------\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"insert_value%E6%8F%92%E5%85%A5%E6%95%B0%E6%8D%AE\"><\/span>insert value\u63d2\u5165\u6570\u636e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230id\u5217\u786e\u5b9e\u662f\u81ea\u589e\u7684\uff0c\u4f46\u6570\u503c\u5e76\u6ca1\u6709\u8fde\u7eed\u3002\u539f\u56e0\u5c31\u662f\u6570\u636e\u5e93\u662f3\u4e2a\u8282\u70b9\uff0c\u800cinsert values \u65b9\u5f0f\u63d2\u5165\u6570\u636e\u662f\u9009\u62e9\u4e00\u4e2a\u8282\u70b9\uff0c\u6240\u4ee5\u672c\u6765\u5206\u914d\u4e2a\u5176\u5b832\u4e2a\u8282\u70b9\u7684id\u7f16\u53f7\uff0c\u4e22\u5931\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase&gt; select * from t_autoinc;\nEmpty set (Elapsed: 00:00:00.34)\n\ngbase&gt; insert into t_autoinc (name) values ('First'),('Second'),('Third');\nQuery OK, 3 rows affected (Elapsed: 00:00:00.55)\nRecords: 3  Duplicates: 0  Warnings: 0\n\ngbase&gt; select * from t_autoinc;\n+----+--------+\n| id | name   |\n+----+--------+\n|  1 | First  |\n|  4 | Second |\n|  7 | Third  |\n+----+--------+\n3 rows in set (Elapsed: 00:00:00.03)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E8%8E%B7%E5%BE%97%E8%87%AA%E5%A2%9E%E5%88%97%E7%9A%84%E5%80%BC\"><\/span>\u83b7\u5f97\u81ea\u589e\u5217\u7684\u503c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53ea\u80fd\u5f97\u5230\u4e0a\u6b21\u64cd\u4f5c\u7684\u81ea\u589e\u5217\u7684\u503c\uff0c\u4ece\u6bcf\u4e2a\u8282\u70b9\u8fd4\u56delast_insert_id\uff0c\u9009\u62e9\u6700\u5c0f\u7684\u8fd4\u56de\u3002\u6240\u4ee5\u5bf9\u4e8einsert values\u5355\u503c\u65f6\u6700\u6709\u6548\u3002&lt;=0\u8868\u793a\u65e0\u6548\u3002<\/p>\n\n\n\n<p>\u5982\u4e0b\u662f3\u8ba1\u7b97\u8282\u70b9\u96c6\u7fa4\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase&gt; insert into t3_inc (name) values('t3_first');\nQuery OK, 1 row affected (Elapsed: 00:00:00.13)\n\ngbase&gt; select last_insert_id();\n+------------------+\n| last_insert_id() |\n+------------------+\n|                2 |\n+------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; insert into t3_inc (name) values('t3_first'),('333'),('444');\nQuery OK, 3 rows affected (Elapsed: 00:00:00.10)\n\ngbase&gt; select last_insert_id();\n+------------------+\n| last_insert_id() |\n+------------------+\n|                3 |\n+------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase&gt; select * from t3_inc;\n+----+----------+\n| id | name     |\n+----+----------+\n|  1 | t3_first |\n|  2 | t3_first |\n|  3 | t3_first |\n|  6 | 333      |\n|  9 | 444      |\n+----+----------+\n5 rows in set (Elapsed: 00:00:00.01)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"load_%E5%8A%A0%E8%BD%BD%E6%96%B9%E5%BC%8F%E5%85%A5%E5%BA%93\"><\/span>load \u52a0\u8f7d\u65b9\u5f0f\u5165\u5e93<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6784\u9020\u4e00\u4efd\u6570\u636e\uff0c\u76ee\u524d3\u4e2a\u8282\u70b9\uff0c\u6211\u4eec\u5148\u6784\u9020\u4e2a3\u7684\u6574\u500d\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>cat \/home\/gbase\/inc.txt\nAAAA\nBBBB\nCCCC\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8A%A0%E8%BD%BD%EF%BC%8C%E7%9C%8B%E7%BB%93%E6%9E%9C\"><\/span>\u52a0\u8f7d\uff0c\u770b\u7ed3\u679c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5176\u4e2d id\u5217\u662f\u81ea\u589e\u5217\uff0c\u4e0d\u5141\u8bb8\u52a0\u8f7d\uff0c\u6240\u4ee5\u6211\u4eec\u7528table_fields \u6307\u5b9a\u6211\u4eec\u53ea\u52a0\u8f7dname\u5217\u3002\u53ef\u4ee5\u770b\u5230\u52a0\u8f7d\u7684\u672c\u6b21\u6570\u636eid\u662f\u81ea\u589e\u7684\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>gbase&gt; load data infile 'sftp:\/\/gbase:gbase1234@10.0.2.102\/home\/gbase\/inc.txt' into table t_autoinc fields terminated by ',' table_fields 'name';\nQuery OK, 3 rows affected (Elapsed: 00:00:01.26)\nTask 10245 finished, Loaded 3 records, Skipped 0 records\n\ngbase&gt; select * from t_autoinc;\n+----+--------+\n| id | name   |\n+----+--------+\n|  1 | First  |\n|  4 | Second |\n|  7 | Third  |\n|  8 | BBBB   |\n|  9 | CCCC   |\n| 10 | AAAA   |\n+----+--------+\n6 rows in set (Elapsed: 00:00:00.03)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9E%84%E9%80%A0%E4%B8%8D%E6%98%AF3%E7%9A%84%E6%95%B4%E5%80%8D%E6%95%B0%E7%9A%84%E6%95%B0%E6%8D%AE%EF%BC%8C%E5%8A%A0%E8%BD%BD%E5%A4%9A%E6%AC%A1\"><\/span>\u6784\u9020\u4e0d\u662f3\u7684\u6574\u500d\u6570\u7684\u6570\u636e\uff0c\u52a0\u8f7d\u591a\u6b21<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230ID\u786e\u5b9e\u662f\u589e\u52a0\u7684\uff0c\u4f46\u53ca\u65f6\u5728\u4e00\u6b21\u52a0\u8f7d\u5185\u90e8\uff0c\u4e5f\u4e0d\u4fdd\u8bc1\u662f\u8fde\u7eed\u7684\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>cat \/home\/gbase\/inc.txt\nAAAA\nBBBB\nCCCC\nDDDDDD\n\ngbase&gt; load data infile 'sftp:\/\/gbase:gbase1234@10.0.2.102\/home\/gbase\/inc.txt' into table t_autoinc fields terminated by ',' table_fields 'name';\nQuery OK, 4 rows affected (Elapsed: 00:00:01.34)\nTask 10246 finished, Loaded 4 records, Skipped 0 records\n\ngbase&gt; select * from t_autoinc;\n+----+--------+\n| id | name   |\n+----+--------+\n|  1 | First  |\n|  4 | Second |\n|  7 | Third  |\n|  8 | BBBB   |\n| 11 | CCCC   |\n|  9 | CCCC   |\n| 12 | AAAA   |\n| 15 | DDDDDD |\n| 10 | AAAA   |\n| 13 | BBBB   |\n+----+--------+\n10 rows in set (Elapsed: 00:00:00.03)\n\ngbase&gt; load data infile 'sftp:\/\/gbase:gbase1234@10.0.2.102\/home\/gbase\/inc.txt' into table t_autoinc fields terminated by ',' table_fields 'name';\nQuery OK, 4 rows affected (Elapsed: 00:00:01.32)\nTask 10247 finished, Loaded 4 records, Skipped 0 records\n\ngbase&gt; select * from t_autoinc;\n+----+--------+\n| id | name   |\n+----+--------+\n|  9 | CCCC   |\n| 12 | AAAA   |\n| 15 | DDDDDD |\n| 17 | CCCC   |\n| 10 | AAAA   |\n| 13 | BBBB   |\n| 18 | AAAA   |\n| 21 | DDDDDD |\n|  1 | First  |\n|  4 | Second |\n|  7 | Third  |\n|  8 | BBBB   |\n| 11 | CCCC   |\n| 16 | BBBB   |\n+----+--------+\n14 rows in set (Elapsed: 00:00:00.04)\n\ngbase&gt; select * from t_autoinc order by id;\n+----+--------+\n| id | name   |\n+----+--------+\n|  1 | First  |\n|  4 | Second |\n|  7 | Third  |\n|  8 | BBBB   |\n|  9 | CCCC   |\n| 10 | AAAA   |\n| 11 | CCCC   |\n| 12 | AAAA   |\n| 13 | BBBB   |\n| 15 | DDDDDD |\n| 16 | BBBB   |\n| 17 | CCCC   |\n| 18 | AAAA   |\n| 21 | DDDDDD |\n+----+--------+\n14 rows in set (Elapsed: 00:00:00.37)\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u52a0\u8f7d\u76f8\u5173\u5176\u5b83\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003<\/p>\n\n\n\n<p><a href=\"http:\/\/www.gbase8.cn\/en\/?tag=%e5%8a%a0%e8%bd%bd\">http:\/\/www.gbase8.cn\/?tag=%e5%8a%a0%e8%bd%bd<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9\"><\/span>\u6ce8\u610f\u4e8b\u9879<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u96c6\u7fa4\u5c42\u7684\u81ea\u589e\u5217\uff0c\u4e0d\u80fd\u6307\u5b9a\u8d77\u59cb\u503c\uff0c\u57fa\u503c\uff0c\u6b65\u957f\u7b49\u53c2\u6570\uff0c\u7531\u96c6\u7fa4\u81ea\u52a8\u7ef4\u62a4\u3002\u5355\u673a\u53ef\u4ee5\u3002<\/li><li>\u81ea\u589e\u5217\u5fc5\u987b\u662f\u6574\u6570\u7c7b\u578b\uff0ctinyint,smallint,int,bigint\u4e2d\u7684\u4e00\u79cd\u3002<\/li><li>\u96c6\u7fa4\u81ea\u589e\u5217\uff0c\u4e0d\u4fdd\u8bc1\u8fde\u7eed\u3002<\/li><li>\u81ea\u589e\u5217\u7684\u8868\uff0c\u4e0d\u652f\u6301insert \u5e76\u53d1\uff0c\u4ece\u8868\u9501\u5347\u7ea7\u4e3a\u72ec\u5360\u5199\u9501\uff0c\u907f\u514d\u5e76\u53d1\u81ea\u589e\u5217\u7684\u503c\u91cd\u590d\u3002<\/li><li>\u6bcf\u6b21DML\u64cd\u4f5c\u524d\uff0c\u90fd\u4f1a\u83b7\u5f97\u6240\u6709\u8282\u70b9\u81ea\u589e\u5217\u7684\u5f53\u524d\u6700\u5927\u503c\uff0c\u4f30\u8ba1\u662f\u4fdd\u5b58\u5728\u5143\u6570\u636e\u91cc\u3002\u7c7b\u4f3c\u4ecegnode\u7684tables\u8868auto_increment\u5217\u67e5\u8be2\u5230\u3002<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>&#91;gbase@gbase_rh7_001 gcluster]$ gncli\n\nGBase client 9.5.2.44.1045e3118. Copyright (c) 2004-2022, GBase.  All Rights Reserved.\n\ngbase&gt; select table_name,auto_increment from information_schema.tables where auto_increment is not null;\n+------------+----------------+\n| table_name | auto_increment |\n+------------+----------------+\n| time_zone  |              0 |\n| t2_inc_n1  |              1 |\n| t2_inc_n3  |              0 |\n| t3_inc_n1  |              1 |\n| t3_inc_n3  |              0 |\n| t_inc_n1   |            101 |\n| t_inc_n3   |              0 |\n+------------+----------------+\n7 rows in set (Elapsed: 00:00:00.19)\n<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\uff0c\u4ece\u4e00\u5f00\u59cb\u5c31\u4e0d\u652f\u6301\u4e3b\u952e\uff0c\u5916\u952e\uff0c\u552f\u4e00\u952e\u7b49\uff0c\u540c\u65f6\u56e0\u4e3a\u6280\u672f\u539f\u56e0\uff0c\u4e5f\u6ca1\u6709\u652f\u6301\u81ea\u589e\u5217\u3002 \u5728V95\u7248\u672c\u91cc\uff0c\u7b2c\u4e00\u6b21\u6b63\u5f0f\u652f\u6301\u4e86\u81ea\u589e\u5217\uff0c\u4f46\u4e5f\u6709\u4e00\u4e9b\u9650\u5236\uff0c\u7279\u522b\u662f\u4e0d\u4fdd\u8bc1\u6570\u503c\u8fde\u7eed\u3002\u5982\u679c\u7528\u6237\u975e\u5e38\u5173\u5fc3\u8fde\u7eed\u6027\uff0c\u8bf7\u5728\u539f\u59cb\u6570\u636e\u91cc\u5305\u542b\u8ba1\u7b97\u597d\u7684\u5217\u503c\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[60],"class_list":["post-1073","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-v95"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=1073"}],"version-history":[{"count":28,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1073\/revisions"}],"predecessor-version":[{"id":10607,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1073\/revisions\/10607"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=1073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=1073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=1073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}