nalevo Новичок 20 Окт 2004 #1 вопрос по IF(expr1, expr2, expr3) AS nnn Доброго времени суток. Не могу понять почему не работает вот такая выборка: SELECT IF(2>1, 1, 0) AS nnn FROM table WHERE nnn=1 Пишет Unknown column 'nnn' in 'where clause' MySQL version: 4.1.5-gamma
вопрос по IF(expr1, expr2, expr3) AS nnn Доброго времени суток. Не могу понять почему не работает вот такая выборка: SELECT IF(2>1, 1, 0) AS nnn FROM table WHERE nnn=1 Пишет Unknown column 'nnn' in 'where clause' MySQL version: 4.1.5-gamma
Сергей123 Новичок 20 Окт 2004 #2 The alias is used as the expression's column name and can be used with ORDER BY or HAVING clauses. -~{}~ 20.10.04 13:20: It is not allowed to use a column alias in a WHERE clause, because the column value may not yet be determined when the WHERE clause is executed.
The alias is used as the expression's column name and can be used with ORDER BY or HAVING clauses. -~{}~ 20.10.04 13:20: It is not allowed to use a column alias in a WHERE clause, because the column value may not yet be determined when the WHERE clause is executed.
Сергей123 Новичок 20 Окт 2004 #4 ...где ему, собственно, и место, судя по твоему примеру SELECT ... FROM table WHERE 2>1