mysql as, order by,where/sum,avg,min,max
create table student ( user_id varchar(50) not null, user_name char(50) not null, age tinyint default '0', gender enum('M','F'), year enum('1','2','3'), hakjum char(1)); hakjum 컬럼 삭제 alter table student drop hakjum; 다음 데이터 입력 user_id user_name age gender year a1 Tom 15 M 2 a2 Jane 16 F 3 a3 Yakima 14 M 1 a4 Yong 14 Null 1 a5 Minyo 0 F Null a6 Kang 15 Null 2 a7 Kim 0 M Null a8 Miranda 15 F 2 inse..
2015. 8. 5.
mysql 테이블 속성변경(수정,추가,삭제) modify,add, drop 테이블 초기화(truncate)
woobi나 dothome을 통해 서버생성 후 putty나 xshell을 통해 접속. 1. DB 생성 (1)mysql -uroot -papmsetup mysql (enter) //root권한 (2) create database school; (enter) //school이라는 테이블명을 가진 데이터베이스 생성 (3) insert into school(Host,User,Password) values('localhost','school',password('1234'));//password로 했을 때 비밀번호를 감춰줌 // 'Y'를 -> 19개 입력 (4) insert into db values ('localhost','school','school','Y','Y','Y','Y','Y','Y','Y','Y','..
2015. 8. 5.