
UPDATE ltkjpeisTest.tj_project a
    JOIN ltkjpeisTest.tj_project_beifen b ON b.pro_id = a.pro_id
    SET a.pro_default = b.pro_default,a.pro_scope = b.pro_scope,a.result_type = b.result_type;



# 查看数据库占用内存大小
SELECT table_schema AS 'Database',
       SUM(data_length + index_length) / 1024 / 1024 AS 'Size (MB)'
FROM information_schema.tables
WHERE table_schema = 'ltkjpeis10'
GROUP BY table_schema;

# 查看设置中预设的数据库内存大小
SHOW VARIABLES LIKE 'innodb_buffer_pool_size';

# 查看最大的连接数
SHOW VARIABLES LIKE 'max_connections';

# 不再使用
#INSERT INTO sys_user(dept_id,user_name,nick_name,phonenumber,sex,password)
# 陕健医同步职工
#SELECT 100 as dept,a.zhigonggh,a.zhigongxm,b.dianhua1,
#       CASE WHEN b.xingbie = 1 THEN 0 WHEN b.xingbie = 2 THEN 1 ELSE 2 END,
#       '$2a$10$Uxk6FG0EkaGhCGPfMd4qLezLO5RKKCEfwcHA7ppjgGYNgCjTsd5Iy' as pass
#FROM `ltkj_shanxiqinsqyy_getzhigongpagezd` a JOIN ltkj_shanxiqinsqyy_getlistyishengzd b
#    ON a.zhigongid = b.zhigongid;

# 不再关联医生表
INSERT INTO sys_user(dept_id,user_name,nick_name,password)
# 陕健医同步职工
SELECT 100 as dept,a.zhigonggh,a.zhigongxm,
       '$2a$10$Uxk6FG0EkaGhCGPfMd4qLezLO5RKKCEfwcHA7ppjgGYNgCjTsd5Iy' as pass
FROM `ltkj_shanxiqinxatlgcyy_getzhigongpagezd` a
