Create an audit table for triggers later
SQL
Hard
3 views
Problem Description
Create AuditLog(audit_id, table_name, row_id, action, changed_at).
Output Format
DDL statement(s)
Official Solution
CREATE TABLE AuditLog (audit_id INT PRIMARY KEY, table_name VARCHAR(50) NOT NULL, row_id INT NOT NULL, action VARCHAR(20) NOT NULL, changed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!