I revisited some of my code from my beginner days and found that some of the SQL table column names are so ambiguous it made me cringe.
Now If I go ahead and change the names, the time and effort required to correct all the mappings in the code doesn't seem justifiable at this point.
I was wondering if its possible to provide an alias at all when inserting to the DB?
I ask because you can use an alias on a SELECT
like this:
SELECT users.id, username, number AS order_number FROM users INNER JOIN orders ON users.id = orders.user_id;
Or does anyone have any other suggestions on how I can accomplish this?