티스토리 뷰
MySQL 시작
mysql -u root -p
MySQL 비밀번호 입력
****
전체 db보기
mysql> show databases;
특정 db 로 이동
mysql> use 이름;
이름();
mysql> create table [table name] ();
CREATE TABLE customers(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NULL,
phone VARCHAR(255) NULL,
email VARCHAR(255) NULL,
account_num VARCHAR(255) NULL,
address VARCHAR(255) NULL,
PRIMARY KEY (id)
);
전체 테이블 보기
mysql> show tables;
특정 테이블 보기
mysql> describe 선택테이블;
테이블의 모든 데이터 불러오기
mysql> SELECT * FROM [table name];
테이블삭제
mysql> drop table [table name]
데이터 입력하기
mysql> INSERT INTO [table name] VALUES ( , , );
한 줄 삭제
mysql> DELETE FROM [table name] WHERE condition;
테이블의 전체 데이터 삭제
mysql> DELETE FROM [table name];
테이블의 특정 데이터 삭제
mysql> DELETE FROM [table name] WHERE;
e.g. delete from customers where id=9;
Reference
https://www.w3schools.com/sql/default.asp
http://www.zbeanztech.com/blog/important-mysql-commands
'Programming' 카테고리의 다른 글
git the requested URL returend error : 403 (0) | 2020.02.17 |
---|---|
DataGrip serverTimezone Error (0) | 2019.08.12 |
How to create MySQL database table using terminal on Mac (0) | 2019.03.13 |
git commands (0) | 2019.03.07 |
MVC pattern (0) | 2019.03.04 |
- Total
- Today
- Yesterday
- compareTo()
- HashMap
- Javascript Algorithm
- 프로그래머스
- Object type casting
- hackerrank javascript
- spring boot application
- 프로그래머스 알고리즘문제
- 프로그래머스 알고리즘
- code refactoring
- substring()
- java
- javascript
- hackerrank solution
- ... in Javascript
- rest parameter
- repeat()
- C++
- Collection Framework
- hackerrank javascript solution
- hackerrank
- algorithm
- easy algorithm
- easy javascript algorithm
- math.max
- math.abs
- 알고리즘
- HackerRank Algorithm
- string class in java
- equals()
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |