SQL : Parent ID Example
theapache64CREATE TABLE tasks( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, title TEXT, is_done TINYINT DEFAULT 0, parent_id INT NOT NULL DEFAULT 0, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP )
CREATE TABLE tasks( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, title TEXT, is_done TINYINT DEFAULT 0, parent_id INT NOT NULL DEFAULT 0, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP )