blob: 884d4e20d70c2e158d5636cc56f8c299f8dc3923 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
---
format: markdown
toc: no
...
# SQL
### UPDATE with JOIN
To do an update based on a join::
UPDATE tableOne t1 INNER JOIN tableTwo t2 ON t1.fk_two = t2.id SET t1.has_two = 1 WHERE t2.is_good = 1;
### JOINs
Useful visual summary: http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins
|