表复制的学习

INSERT INTO t_notice (
    account_code,
    SOURCE,
    create_time,
    status
) SELECT
    account_code,
    '自动抢投' AS SOURCE,
    now() AS create_time,
    '已读' AS status
FROM
    t_account
WHERE
    auto_investment = '1'

 

将表A中某些字段复制插入到已有的表中。

 

 

 

 

你可能感兴趣的:(表复制的学习)