GET MAX(ID) FOR ALL TABLES SQL SERVER
I am trying to select Max(ID) for all tables in my database. I tried the
below query but there is no AUTO-INCREMENT column available. Is there
something else that I can try?
SELECT TABLE_NAME, AUTO_INCREMENT
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'mydb'
No comments:
Post a Comment