9월 10일 금요일 TIL

김병훈·2021년 9월 10일
0

til

목록 보기
77/89

in terminal

  • mysql.server start
  • mysql -u root -p
    • pw input
  • create database dbName;
  • show databases;
  • use dbName;

SQL(Structured Query Language)

DCL(Data Control Language)

  • grant , revoke , deny

    mydeal 이라는 유저를 만들고, 유저에게 권한을 부여(grant)하고 권한을 뺏고(revoke), 거부시키는(deny) 그런 명령들이다.

DDL(Data Definition Language)

  • create , alter, drop, rename, truncate

    table을 생성, 드롭, 리네임, truncate(데이터를 복구가 안되도록 완전히 날림) 한다.

DML(Data Manipulation Language)

  • create, select, update, delete

    가장 많이 쓰는 구문으로 말 그대로 이렇게 데이터를 조작하는 언어이다.

TCL(Transaction Control Language)

  • begin transaction, commit, roll back, savepoint

    commit 하면 실제로 디스크에 쓴다. 그전 까지는 메모리에만 남아있다. rollback을 하면 메모리를 비운다. savepoint 는 이제 transaction 을 시작하는 point를 주는 역할을 한다.

profile
블록체인 개발자의 꿈을 위하여

0개의 댓글