1、单条数据的插入
    2、批量插入
    3、表克隆

    1. DML
    2. --单条数据插入 into可以省略
    3. 1)
    4. insert into productType (typename) values("工具类")
    5. 2)
    6. --标识列自增长
    7. insert productType(typename)
    8. select '鞋类'
    9. --多条插入 union去重 union all 不去重(速度快)
    10. 1)
    11. insert into productType(typename)
    12. values('工具类1'),('工具类2'),('工具类3')
    13. 2)
    14. insert into productType(typename)
    15. select 'aaa' union
    16. select 'bbb' union
    17. select 'ccc' union all
    18. select 'ccc'
    19. --克隆表数据
    20. 1)目标表在数据库已经存在
    21. insert into Test(name) --目标表
    22. select typename from productType
    23. 2)目标表之前在数据库中不存在,执行操作时自动创建
    24. select typename into Test --目标表
    25. from productType