update query
I need a update query.
Please dont go by the normalizaton, as the situation explained below has reduntant data.
Table : "users"
Columns: "username", "userid"
userid is primary key
Table : "records"
Columns: "recordid", "username", "userid"
recordid is primary key
userid is foreignkey
The "records" table has few records which have fixed hard coded text say "abc" in the "username" field.
I want to update the incorrect "username" in "records" table with the correct ones; i.e. fetch them from users and update in "records" table, without using cursor.
Regards,
Vinay
|