목록BackEnd/DB (1)
방카@Dev
[MySQL] Insert 시 자동갱신 TIMESTAMP
칼럼이름 / timestamp / default current_timestampCREATE TABLE HIST_PAY( pay_num int auto_increment primary key, user_id varchar(20) not null, item_name varchar(20) not null, item_num int not null, pay_date timestamp default current_timestamp, foreign key(user_id) references user(user_id) ); ➡️ 예시 DB(hist_pay)col_numcol_typedetailpay_numINTauto_increment, primary_keyuser_idVarchar(20)foreign ke..
BackEnd/DB
2024. 5. 14. 16:20