0
why we use 1=1 in sql query
please clarify me SELECT * FROM user WHERE userID=102 or 1=1 ; what does it mean 1=1
6 Antworten
+ 1
@rishi , if you don't use 1= 1 then it will take only first condition.
0
it's true condition, if userid does not equal to 102 then it will take condition as true . and return all the values
0
any disadvantage of this quey??
0
what would happen when i do not use 1=1 ??
0
so sangmesh u mean to say that 1=1 is just working as a validation conditiin
0
@nitesh .. it's just true condition