Create table with timestamps
SQL
Easy
2 views
Problem Description
Create LoginLogs(log_id, user_id, logged_at default current timestamp, ip_address).
Output Format
DDL statement(s)
Constraints
Use CURRENT_TIMESTAMP
Official Solution
CREATE TABLE LoginLogs (log_id INT PRIMARY KEY, user_id INT NOT NULL, logged_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, ip_address VARCHAR(50));
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!