Open hyunminini opened 2 years ago
주제 : 사내 홈페이지
사내 커뮤니티 게시판
MYSQL , AWS 사용 예정
레이아웃 작성 : 피그마 JAVA, JSP, Tomcat
use pp;
drop table emp;
create table emp (
empno int not null primary key,
deptno int ,
pw VARCHAR(30) not null,
ename VARCHAR(20) not null,
grade VARCHAR(20) not null,
mgr int not null
);
alter table emp add foreign key(deptno) references dept(deptno);
select * from emp;
desc emp;
create table dept (
deptno int primary key ,
dname VARCHAR(20) not null
);
select * from dept;
alter table board add foreign key(empno) references emp(empno);
drop table board;
create table board (
cnum int auto_increment primary key,
empno int,
title VARCHAR(100)not null,
content longtext not null,
UPLOADFILE blob ,
CATEGORY varchar(20) not null,
readnum int default '0',
writedate timestamp not null default current_timestamp(),
MODIFYDATE timestamp,
DELDATE timestamp
);
select * from board;
create table like_TBL(
idx int auto_increment primary key,
cnum int,
empno int
);
select * from hate_TBL;
create table hate_TBL(
idx int auto_increment primary key,
cnum int,
empno int
);
9월22일 DayLog