Why am i encountering 'unknown column in where clause' in sql?

Example:

SELECT * FROM users WHERE user_name = 'John';

The column specified in the WHERE clause doesn't exist in the table.

Solution:

Ensure the column name is correct and exists in the specified table.


SELECT * FROM users WHERE correctColumnName = 'John';

Beginner's Guide to SQL