Insert into a row at specific position into SQL server table with PK

前端 未结 6 1079
抹茶落季
抹茶落季 2020-12-16 23:58

I want to insert a row into a SQL server table at a specific position. For example my table has 100 rows and I want to insert a new row at position 9. But the ID column whic

6条回答
  •  攒了一身酷
    2020-12-17 00:34

    INSERT INTO customers
    (customer_id, last_name, first_name)
    SELECT employee_number AS customer_id, last_name, first_name
    FROM employees
    WHERE employee_number < 1003;
    

    FOR MORE REF: https://www.techonthenet.com/sql/insert.php

提交回复
热议问题