SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE users ( user_id INT PRIMARY KEY, username VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255), role TEXT DEFAULT 'user' ); CREATE TABLE data_matrix_logs ( log_id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INT, request_type TEXT DAFAULT 'Создано', tp_code TEXT, requested_count INT, request_date DATETIME DEFAULT CURRENT_TIMESTAMP, processing_status TEXT CHECK (processing_status IN ('Created', 'Revert', 'Complete')), FOREIGN KEY (user_id) REFERENCES users(user_id) ); INSERT INTO data_matrix_logs (user_id, tp_code) VALUES (1, 1); SELECT * FROM data_matrix_logs;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear