Using temp table in PL/pgSQL procedure for cleaning tables

前端 未结 3 1345
萌比男神i
萌比男神i 2020-12-17 22:29

I\'m trying to delete all data related to a user id from a game database.

There is a table holding all games (each played by 3 players):

# select * f         


        
3条回答
  •  [愿得一人]
    2020-12-17 22:50

    You can try

    EXECUTE 'create temp table temp_gids AS select from pref_scores where id=$1'
        USING _id;
    

提交回复
热议问题