older
V2EX  ›  问与答

mysql 一个表只有一个字段,且此字段是 AUTO_INCREMENT, 如何插入数据?

  •  
  •   older · Aug 5, 2013 · 2910 views
    This topic created in 4690 days ago, the information mentioned may be changed or developed.
    1 replies    1970-01-01 08:00:00 +08:00
    SonicXP
        1
    SonicXP  
       Aug 5, 2013   ❤️ 1
    mysql> create table test(a int(10) not null auto_increment, primary key (`a`));
    Query OK, 0 rows affected (0.01 sec)

    mysql> insert into test values();
    Query OK, 1 row affected (0.00 sec)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5353 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:02 · PVG 17:02 · LAX 02:02 · JFK 05:02
    ♥ Do have faith in what you're doing.