I am trying to run the below ddl statment generated on DB2 to mysql. However, it gives me error that row_number() doesn't exist on mysql.
Can someone please tell me how to emulate this in mysql ?
Query
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;