SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE dept ( deptno NUMERIC(5) NOT NULL, deptname VARCHAR(20), location VARCHAR(50) ); CREATE OR REPLACE TRIGGER auto_increment_deptno BEFORE INSERT ON dept FOR EACH ROW BEGIN IF :NEW.deptno IS NULL THEN SELECT COALESCE(MAX(deptno), 0) + 1 INTO :NEW.deptno FROM dept

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear