MEMBER 테이블 (부모)
컬럼명 : username, password,enabe 있어야된다
enable 컬럼명은 기본 값으로 '1' 있어야 한다
MEMBER_AUTH 테이블
컬렴명 : USER_ID,AUTH
MEMBER_AUTH 값 넣기
SELECT USER_ID,'ROLE_MEMBER'
FROM MEMBER;
INSERT INTO MEMBER_AUTH(USER_ID, AUTH)
SELECT USER_ID,'ROLE_MEMBER'
FROM MEMBER;
COMMIT;
MEMBER 테이블 , MEMBER_AUTH 테이블 join
SELECT A.USER_ID, A.USER_NAME, A.PASSWORD, A.REG_DATE, A.COIN, A.ENABLED
, B.AUTH
FROM MEMBER A, MEMBER_AUTH B
WHERE A.USER_ID =B.USER_ID
AND A.USER_ID='b001'