안녕하세요. 업데이트 쿼리를 구상중인데 막혀서 질문 좀 드리겠습니다..
update account set (USER_NAME, EMAIL, HTGUBUN, ORGAN_NAME, POSITION_NAME, PHONE, MOBILE, LOCATION, DIVISION1_NM, DEPARTMENT_NAME, SABUN) = (select NAME, EMAIL, HTGUBUN, ORGAN_NAME, JIKWI_NAME, WORK_TEL, MOBILE_TEL, LOCATION, DIVISION1_NM, DIVISION2_NM, SABUN from lgeim_user where account.USER_ID = lgeim_user.SSOID);
위 쿼리에서 업데이트하는 컬럼
(USER_NAME, EMAIL, HTGUBUN, ORGAN_NAME, POSITION_NAME, PHONE, MOBILE, LOCATION, DIVISION1_NM, DEPARTMENT_NAME, SABUN)
외에 modify_date 라는 컬럼이 있는데요.
업데이트할 때마다 이 modify_date 라는 컬럼에 sysdate를 넣어주고 싶습니다.
sysdate를 어떻게 넣어줘야할까요~?
update account set (USER_NAME, EMAIL, HTGUBUN, ORGAN_NAME, POSITION_NAME, PHONE, MOBILE, LOCATION, DIVISION1_NM, DEPARTMENT_NAME, SABUN, modify_date) = (select NAME, EMAIL, HTGUBUN, ORGAN_NAME, JIKWI_NAME, WORK_TEL, MOBILE_TEL, LOCATION, DIVISION1_NM, DIVISION2_NM, SABUN, sysdate from lgeim_user where account.USER_ID = lgeim_user.SSOID);