- Copy the script into Query window
- Select the appropriate database
- Select Query Result to Text from the Query Menu
- Execute the script
- Copy the result/ output script in the query window
- Select the same database
- Execute the script
- Validate the primary key names changed.
*Note-
PK_TableName is considered as standard primary key notation
Script works even if PK is referred by FK.