select * , RANK() OVER (ORDER BY CAST(batchid AS INT) DESC) AS RNK FROM {0}.tablename
I am new to coding and would like to where "0" holding the database name i