create database sampledb;
use sampledb;
drop table student;
create table student
(
name varchar(20) not null, -- 이름
dept varchar(20) not null, -- 학과
id char(10) primary key not null, -- 학번, 기본키
address varchar(50) not null -- 주소
);
insert into student values('최규식', '스마트컨텐츠개발', '2014071023', '강원도 홍천군');
insert into student values('박태수', '스마트컨텐츠기획', '2014072008', '경기도 용인시');
insert into student values('정상혁', '스마트컨텐츠마케팅', '2014071020', '서울시 관악구');
select * from student order by name asc;
use sampledb;
drop table student;
create table student
(
name varchar(20) not null, -- 이름
dept varchar(20) not null, -- 학과
id char(10) primary key not null, -- 학번, 기본키
address varchar(50) not null -- 주소
);
insert into student values('최규식', '스마트컨텐츠개발', '2014071023', '강원도 홍천군');
insert into student values('박태수', '스마트컨텐츠기획', '2014072008', '경기도 용인시');
insert into student values('정상혁', '스마트컨텐츠마케팅', '2014071020', '서울시 관악구');
select * from student order by name asc;
'2014학년도 겨울 심화학기 > JAVA' 카테고리의 다른 글
11일차 Swing02 클래스 (Table로 출력) (0) | 2014.12.22 |
---|---|
10일차 Swing03 클래스 (메뉴 관련 객체 생성, 메뉴 액션리스너 추가) (0) | 2014.12.19 |
10일차 Swing02 클래스 (JDBC/Statement 연결 구문 위치변경, 주소칼럼 추가, 과제) (0) | 2014.12.19 |
9일차 Swing02 클래스 (DML 모두 구현, Alert Dialog / 확인창 구현) (0) | 2014.12.18 |
8일차 Swing02 클래스 (이벤트 처리방법 3가지, JFrame, JTextField에 DML 기능 구현 : select, insert) (0) | 2014.12.17 |