I have created a view in MySql. But now my requirement is to create an Id column in that view which should be auto increment.
My current view is:-
CR
select @rownum:=@rownum+1 'autoID',m.mediaThumbnailUrl , q.surveyID from (SELECT @rownum:=0) r, media m join question q on m.mediaAutoID = q.backgroundImageID ;