[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;
출처
댓글
댓글 쓰기