Tagged: sql


WordPress SQL Syntax Example

I have a couple of tables I’m joining and only want to return users that a field missing in the joined table. Users id fname lname userMeta id metaKey metaValue I’m trying to find...


SQL Case Statement Example

Basic syntax for using case when statements in SQL. For this example we want the following: If Field1 = 2 and Field2 = 2 then use the date in Field3 else use ‘1/1/3000’. Here...