How to make a script that reads from a SQL table and modify them?

64 views Asked by At

I have three tables roles, users and userRoles , roles contains all the user role information administrator and defaultUser. User Roles tables contains the relationship between user and roles. The issue is I want to change the Ids of roles table. When I try to do it I lose all the user-role records in userRoles table. I want to write a script so that I can read all the userRoles records and update them to new role ids. How can I write this? Is it possible to do something like this

0

There are 0 answers