List all sequences in a Postgres db 8.1 with SQL

后端 未结 19 1738
旧时难觅i
旧时难觅i 2020-12-12 11:30

I\'m converting a db from postgres to mysql.

Since i cannot find a tool that does the trick itself, i\'m going to convert all postgres sequences to autoincrement id

19条回答
  •  一向
    一向 (楼主)
    2020-12-12 12:07

    Here is another one which has the schema name beside the sequence name

    select nspname,relname from pg_class c join pg_namespace n on c.relnamespace=n.oid where relkind = 'S' order by nspname
    

提交回复
热议问题