[Solved] MySQL-How to select column based on value in a different column but same row? [closed]


This is one of the simplest types of SQL queries.

SELECT user_id
FROM yourTable
WHERE user_name="UserA"

The first line says which columns you want to return in the result.

The second line identifies the table you want to get the columns from.

The third line specifies conditions on the rows you want to use from the table.

1

solved MySQL-How to select column based on value in a different column but same row? [closed]