older
V2EX  ›  问与答

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

  •  
  •   older · Aug 5, 2013 · 2927 views
    This topic created in 4701 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   ·   838 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 21:03 · PVG 05:03 · LAX 14:03 · JFK 17:03
    ♥ Do have faith in what you're doing.