Hi Kiran,
In my opinion the best way to do this is to create a new attribute for the integer/long and create a conversion that sets for every entity the integer value based on the autonumber value, if that conversion is finished you can remove the autonumber attribute, this means that you need to redeploy twice but I think this is the safest option for staying within the Mendix Technology.
Yes, you can execute SQL and OQL with marketplace modules that you can download, however this is bearing a risk and this goes for a big part outside of the standard Mendix Technology so you should be really sure what you are doing to not mess up with your database.
https://marketplace.mendix.com/link/component/66876
Hope this helps
Good luck