hi,
how can I do the following points in mysql (possibly using phpmyadmin):
1) Given an existing column of numeric values (colA), create a new column with text data (colB) and automatically fill this column with "typeA" if colA = 0, and "typeB" if colB > 0 ?
2) Given the following 2 tables Users and Docs:
Table Users has the columns "Username" and "UserID", Table Docs has columns "DocID", "Username" and UserID" (it is redundant, I know)
The column Username in table Docs is empty and I have to fill it automatically given the UserID.
What's the SQL code for these 2 tasks ?
thanks