데이터베이스
`create database 'a1';`
`use 'a1';`
`drop database 'a1';`
`drop database if exists 'a1';`
`show databases;`
<br></br>
테이블
create table article (
title varchar(100),
body text
);
`alter table article add column id int first;`
`desc article;`
<br></br>
데이터
INSERT INTO article
SET title = '제목',
`body` = '내용';
select title
from article;
UPDATE article
SET regDate = NOW()
WHERE id = 3;
DELETE FROM article
WHERE id = 2;
💡 새로 알게된 것
now() 함수
- 현재 시각을 알려줌
id int first
- id 칼럼이 맨 앞으로 들어감
regDate datetime after id
- regDate 칼럼이 id 뒤로 들어감