[SOLVED] Column that autoincrements number from last account created

Hey guys I’m almost done with my dapp only 1 thing I can’t seem to figure out is how do I got about making a number column that autoincrements whenever an account is created?

So first user id is 1 then when another user makes an account their id is 2 and so on…

any help will be greatly appreciated thank you!

You can set the new id number based on number of rows in the class.

If your rows count is 10 then you new row id will be 11.

could you give me an examples of how that would look like if the class name is “osid”? please and thank you

ok for some reason I can’t get this to work for the _User table but it worked for a custom table I made for Monster… how can I fix this?

                async function dbosid(){
                const query = new Moralis.Query("Monster");
                const Monster = await query.find();

had to run it as a cloud function got it thanks guys