我正在尝试创建视图并出现错误,请帮助我。
create view event as (
SELECT *, TIMEDIFF(new.Event.newdatetimefield, t2.newdatetimefield),TIME_TO_SEC(TIMEDIFF(new.Event.newdatetimefield, t2.newdatetimefield)),IF(TIME_TO_SEC(TIMEDIFF(new.Event.newdatetimefield,
t2.newdatetimefield))>'300','TRUE','FALSE') AS status
FROM new.Event LEFT JOIN new.Event AS t2 ON t2.ID = new.Event.ID - 1);
错误是
错误代码:1060。重复的列名“ ID”