My data looks like this:
TableA
- id INT
- is_in_table_b BOOL
TableB
- id INT
- table_a_id INT
I accidentally wiped out the 'is_in_table_b' BOOL on my dev machine while reorganizing the data structures, and I forgot how I created it. It's just a shortcut for some dev benchmarks.
All the "UPATE ... FROM ...." variations I tried are setting everything as "true" based on a the join. I can't remember if I originally had a CAST in this.
Does anyone know of a simple , elegant way to accomplish this? I just want to set is_in_table_b
to True if the TableA.id appears in TableB.table_a_id. I know some non-elegant ways with inner queries, but I want to remember the more-correct ways to do this. I'm positive I had this done in an "Update From" originally.