[Database] SQL 명령어 정리

[Database] SQL 명령어 정리


SELECT * FROM Customers;

SELECT DISTINCT column1, column2 FROM Customers;


SELECT * FROM Customers WHERE Country='Mexico';


SELECT column1, cloumn2 FROM Customers WHERE Country='Mexico' AND City='Berlin';


SELECT column1, cloumn2 FROM Customers WHERE Country='Mexico' OR City='Berlin';


SELECT column1, cloumn2 FROM Customers WHERE NOT Country='Mexico';


SELECT column1, cloumn2 FROM Customers ORDER BY Country DESC;


INSERT INTO Customers (column1, cloumn2) VALUES ('Tom','Teddy');


SELECT column1, cloumn2 FROM table_name WHERE column_name IS NULL;


UPDATE Customer SET ContactName="Tom" WHERE CustomerID =1;





출처

댓글

이 블로그의 인기 게시물

[소프트웨어공학] NS(Nassi-Schneiderman) 차트

[컴퓨터네트워크] Telnet이란?

[Python] # -*- coding: utf-8 -*-를 쓰는 이유