Skip to content

Instantly share code, notes, and snippets.

@jeremy5189
Created March 6, 2013 14:48
Show Gist options
  • Save jeremy5189/5099775 to your computer and use it in GitHub Desktop.
Save jeremy5189/5099775 to your computer and use it in GitHub Desktop.
Select Multiple Tables From SQL
# 注意,這種選擇方法得到的結果
# 一個 row 內會同時含有兩筆資料
# 建議先跑一遍試試看結果
SELECT *
FROM `twUniversity`, `twHighSchool`
WHERE `twUniversity`.`ipv4` LIKE '140%' AND `twHighSchool`.`ipv4` LIKE '203%'
ORDER BY `twUniversity`.`uid`, `twHighSchool`.`uid`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment