SELECT tees.us_no, tsu.user_code, tsu.user_name_chn, tso.org_code, tso.org_name_en, tees.skill_id, tees.total_train_hours, tees.created_time, tees.updated_time INTO #1709a2ed3e874cab82087ef4f91b7846 FROM tt_esfm_employee_skill tees INNER JOIN tm_sys_user tsu ON tsu.user_id = tees.user_id AND tsu.user_status_en = 'Active' INNER JOIN tm_sys_organization tso ON tsu.org_code = tso.org_code INNER JOIN tm_esfm_skill tes ON tes.skill_id = tees.skill_id AND tes.skill_status = 1 WHERE tees.updated_time >= '2023-05-23';
时间: 2024-02-11 09:05:57 浏览: 128
好的,下面是格式化后的SQL语句:
```
SELECT
tees.us_no,
tsu.user_code,
tsu.user_name_chn,
tso.org_code,
tso.org_name_en,
tees.skill_id,
tees.total_train_hours,
tees.created_time,
tees.updated_time
INTO #1709a2ed3e874cab82087ef4f91b7846
FROM
tt_esfm_employee_skill tees
INNER JOIN tm_sys_user tsu
ON tsu.user_id = tees.user_id
AND tsu.user_status_en = 'Active'
INNER JOIN tm_sys_organization tso
ON tsu.org_code = tso.org_code
INNER JOIN tm_esfm_skill tes
ON tes.skill_id = tees.skill_id
AND tes.skill_status = 1
WHERE
tees.updated_time >= '2023-05-23';
```
在格式化后的SQL语句中,关键字、列名、表名、运算符、逗号等元素都被规整地排列,使得SQL语句更加易读、易于理解和维护。
阅读全文