Node.js

[06.11] Database - 01 기본

ljw4104 2021. 6. 11. 13:01

1.  mySQL로 시작

https://www.w3schools.com/sql/default.asp

 

SQL Tutorial

SQL Tutorial SQL is a standard language for storing, manipulating and retrieving data in databases. Our SQL tutorial will teach you how to use SQL in: MySQL, SQL Server, MS Access, Oracle, Sybase, Informix, Postgres, and other database systems. Start learn

www.w3schools.com

 

데이터 삽입

INSERT INTO 테이블명(<column이름들,>) VALUES(<데이터,>);
#문자열은 ''로 둘러쌓여야 한다.
insert into users(name, age, married, comment) values('홍길동', 40, 1, '자기소개'); 

잘 들어가 있다.

데이터 읽기

SELECT <Column이름들,> FROM <Table이름>

조건이 읽는 데이터 읽기

SELECT [<Column이름들,>] FROM <Table이름> WHERE condition1=value1 AND(OR) condition2=value2...;