How to insert into a table with just one IDENTITY column?

后端 未结 4 932
夕颜
夕颜 2020-12-08 06:22

(Came up with this question in the course of trying to answer this other one)

Consider the following MS-SQL table, called GroupTable:

GroupID
-------
1          


        
4条回答
  •  长情又很酷
    2020-12-08 06:49

    It is possible to insert more than one row at a time.

    For e.g., to insert 30 rows. INSERT INTO GroupTable DEFAULT VALUES GO 30

    This will insert 30 rows by incrementing the identity column each time.

提交回复
热议问题