데이터베이스 생성과 활성화
CREATE DATABASE mydatabase;
USE mydatabase;
DROP DATABASE mydatabase;
테이블
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL
);
DROP TABLE users;
데이터
INSERT INTO users (username, password, email) VALUES ('john_doe', 'password123', '[email protected]');
SELECT * FROM users;
UPDATE users
SET email = '[email protected]'
WHERE username = 'john_doe';
DELETE FROM users
WHERE username = 'john_doe';