I have a table where I need to store two id's from another table. While doing some debugging I noticed some strange behavior of SQL.
Example of wrong sql:
INSERT INTO follower_list set `followerUserId` = '3' AND `followingUserid` = '4'
The above query was inserting the zero's as value in DB. I studied the query closer and realized I had made a mistake of putting and
in place of ,
. The real query I need to fulfill my purpose is:
INSERT INTO table SET col1 = '3' , col2 = '4'
Which worked as I expected. My question is related to the first (incorrect) query - since it executed and is syntactically correct, where would queries like it be used?