0

我正在尝试将 DB2 上生成的以下 ddl 语句运行到 mysql。但是,它给了我一个错误,即 mysql 上不存在 row_number() 。

有人可以告诉我如何在 mysql 中模拟这个吗?

询问

CREATE VIEW "MY_PORTAL"."MyView" AS SELECT ROW_NUMBER() OVER() AS id, b.id batch_id, 
b.name batch_name, b.description batch_desc, b.status batch_status, b.classname batch_classname, 
b.active batch_active, b.server batch_server, s.id scheduler_id, s.typeid scheduler_type_id, 
str.typename scheduler_type_name, s.days scheduler_days, s.hours scheduler_hours, s.minutes scheduler_minutes, 
s.seconds scheduler_seconds FROM myDB.batches b LEFT OUTER JOIN myDB.schedulers s 
ON s.batchid = b.id LEFT OUTER JOIN myDB.scheduler_type_ref str ON str.typeid = s.typeid;
4

0 回答 0