数据库影子表实现

show tables;

drop table if exists user_new,user_old;

create table user_new(name varchar(25),depart varchar(25),salary int(30));

insert user_new values('张三','主管',1000);

create table users like user_new;

rename table user_new to user_old,users to user_new;

具体使用场景还需要再次推敲和改良

你可能感兴趣的:(sqlserver,数据库)