Can I use where true instead of where 1 conditions when concatenating where conditions in sql statements?

1 the result is that true, is tested after using where true

  1. all conditions are null
  2. the first condition is null
  3. all are not null

can get the right result, and where 1 can get the right result. After google, it is found that no one has done so. Why

SELECT * FROM `table` WHERE 1=1
SELECT * FROM `table` WHERE TRUE
SELECT * FROM `table` WHERE 1
Nov.12,2021

it is generally believed that the compatibility of where 1 is better than that of where true, because different databases deal with boolean differently, which can easily lead to some problems.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f6a0-4781a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f6a0-4781a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?