Last active
January 6, 2017 08:00
-
-
Save enujo/c619ae9ce6d9bb7e3dee575800502805 to your computer and use it in GitHub Desktop.
spring mvc insert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 테이블 생성 | |
CREATE TABLE board ( | |
board_no INT(10) NOT NULL COMMENT '글 번호', | |
board_title VARCHAR(50) NOT NULL COMMENT '제목', | |
board_content TEXT NOT NULL COMMENT '내용', | |
board_user VARCHAR(50) NOT NULL COMMENT '사용자', | |
board_pw VARCHAR(20) NOT NULL COMMENT '비밀번호', | |
board_date DATE NOT NULL COMMENT '작성날짜', | |
PRIMARY KEY (board_no) | |
)DEFAULT CHARSET=euckr | |
COMMENT '게시글DB'; | |
ALTER TABLE board | |
MODIFY COLUMN board_no INT NOT NULL AUTO_INCREMENT COMMENT '글 번호'; | |
--테스트를 위한 기본 값 추가 | |
INSERT INTO board | |
(board_title, board_content, board_user, board_pw, board_date) | |
VALUES ('test01', 'test01', 'test01', 'test01', NOW()) | |
INSERT INTO board | |
(board_title, board_content, board_user, board_pw, board_date) | |
VALUES ('test02', 'test02', 'test02', 'test02', NOW()) | |
INSERT INTO board | |
(board_title, board_content, board_user, board_pw, board_date) | |
VALUES ('test03', 'test03', 'test03', 'test03', NOW()) | |
INSERT INTO board | |
(board_title, board_content, board_user, board_pw, board_date) | |
VALUES ('test04', 'test04', 'test04', 'test04', NOW()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment