youtu.be/d3ye07XRexs?list=PLuHgQVnccGMCgrP_9HL3dAcvdt8qOZxjW
create table in mysql
구글에 검색
하지말고
create table in mysql cheat sheet
cheat sheet - 커닝페이퍼
이미지로 검색
본인이 보기 편한것으로 찾아보고 음 대충 이런거구만 하는 정도로 이해하면 될듯하다
컬럼에 데이터값을 강제할 수 있다
숫자인지 문자인지 날짜인지같은걸 말하는듯 하다
int(m) - integer 정수
bigint(m) - 20억 이상의 숫자 저장
int(11)을 많이 쓴다고 한다
not null - 값이 없는 것을 허용하지 않는다
null - 값 없는거 허용
auto_increment - 중복되지않는 자동 식별자
varchar(size) - variable character, 255자 가능
text(size) - 65,535자 가능
longtext(size) - 4기가 가능....???????????????
datetime - 날짜와 시간
values range from '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
primary key
각각의 값들이 중복되면 안될때 주는 것
primary key(id);
아 마지막에 괄호 닫는거 하나 더 안해줘서 에러가 났었다
create table topic(id int(11) not null auto_increment, title varchar(100) not null, description text null, created datetime not null, author varchar(30) null, profile varchar(100) null, primary key(id));
set password = password('바꿀 비밀번호');
비밀번호 바꾸는 명령어