방법 1
INSERT INTO 테이블이름(필드이름1, 필드이름2, 필드이름3, ...) VALUES(데이터값1, 데이터값2, 데이터값3, ...);
방법 2
INSERT INTO 테이블이름 VALUES(데이터값1, 데이터값2, 데이터값3, ...);
INSERT INTO temp_users_list (user_id, user_name, user_birthday) VALUES ('testId', '홍길동', '1990-01-01');
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');
INSERT INTO Customers (CustomerName, PostalCode, Country)
VALUES ('Cardinal', '4006', 'Norway');
SELECT CustomerName, Country, Address
FROM Customers
WHERE Address IS NULL;
SELECT CustomerName, Country, Address
FROM Customers
WHERE Address IS NOT NULL;
UPDATE 테이블이름 SET 필드이름1 = 데이터값1, 필드이름2 = 데이터값2, ... WHERE 필드이름1 = 조건값1;
테이블의 row 의 내용을 수정
주의!
UPDATE temp_users_list SET user_name = '이순신' WHERE user_name = '홍길동';
UPDATE Customers
SET ContactName='Alfred Schmidt', City='Frankfurt'
WHERE CustomerID=1;
DELETE FROM 테이블이름 WHERE 필드이름1 = 데이터값1;
테이블의 row 를 삭제
주의!
DELETE FROM temp_users_list WHERE user_name = '홍길동';
DELETE FROM Customers
WHERE CustomerName='Alfreds Futterkiste';
방법 1
DELETE FROM table_name;
방법 2
DELETE * FROM table_name;