Home > database >  MySql ifnull statements
MySql ifnull statements

Time:09-18

SELECT
Anderson, d AS "id",
IFNULL (a.r oute_id, "") AS" busId, "
IFNULL (a.r oute_name, "") AS" name ",
IFNULL (a.r oute_name_ext, "") AS" nameExt, "
IFNULL (a.s ort, "") AS" sort ",
IFNULL (a.r oute_mapping_name, "") AS" routeMappingName, "
A.r oute_mapping AS "routeMapping,"
A.c reate_by AS "createBy. Id,"
A.c reate_date AS "createDate",
A.u pdate_by AS updateBy. "id",
A.u pdate_date AS "updateDate,"
A.r emarks AS "few,"
A. d. el_flag AS "delFlag
"The FROM
Bus_route a
WHERE a. d. el_flag='0'
The ORDER BY cast (a.s ort AS a DECIMAL) DESC

The above a SQL, IFNULL statements in my local (Windows 7 mysql - 5.7.24) can run normally, but the server (Linux mysql - 5.7.24) complains,
(Err), 1054 - Unknown column 'in' the field list ', give advice or comments please ah ~ ~ ~ ~ ~

CodePudding user response:

CodePudding user response:

Can someone please advise ~ ~ ~ ~ ~ ~ ~ ~ ~

CodePudding user response:

You this error has nothing to do with IFNULL,,
And in the use of double quotes in your statement and in the use of single quotation marks,,
Dealing with this kind of statement in the program, it may because of quotation problem, cause statement errors,,
You'd better unify, using only a quotation
  • Related