관리 메뉴

moozi

9/10 mysql 본문

TIS_2018/응용sw2018_2기

9/10 mysql

moozi 2018. 9. 10. 16:00

-- database 생성
create database sampledb;

 

-- database선택
use sampledb;

 

-- table생성
create table student(
id char(7) primary key,
name varchar(10) not null,
dept varchar(20) not null
);

 

-- 데이터입력
insert into student values('1091011','김철수','컴퓨터시스템');
insert into student values('0792012','최고봉','멀티미디어');
insert into student values('0494013','이기자','컴퓨터공학');

 

-- 조회
select * from student;

'TIS_2018 > 응용sw2018_2기' 카테고리의 다른 글

9/11 haksa  (0) 2018.09.11
9/10 haksa  (0) 2018.09.10
자바연습문제17  (0) 2018.09.10
my.ini  (0) 2018.09.10
mysql jdbc 기본  (0) 2018.09.10
Comments