CREATE TABLE _user (
id VARCHAR(36) NOT NULL,
pro_id VARCHAR(36),
mobile VARCHAR(36) NOT NULL,
ctm DATETIME,
cnt INTEGER,
PRIMARY KEY (id)
);
插入数据:
方法一:
INSERT INTO _user (id,pro_id,mobile,ctm,cnt) VALUES (uuid(), 'pro_id', '13800138000', now(), 1 ) ,
(uuid(), 'pro_id', '13800138001', now(), 1 ) ,
(uuid(), 'pro_id', '13800138002', now(), 1 ) ,
(uuid(), 'pro_id', '13800138003', now(), 1 ) ;
方法二:
INSERT INTO _user (id,pro_id,mobile,ctm,cnt) SELECT id,pro_id,mobile,ctm,cnt FROM _user2 ;