Created
November 5, 2008 10:56
-
-
Save jodosha/22311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SQLite 3 | |
SELECT * FROM "articles" INNER JOIN "articles_categories" ON "articles".id = "articles_categories".article_id WHERE ("articles_categories".category_id = 1 ) | |
+-----+-----------------+---------------------+---------------------+----+------------+-------------+ | |
| id2 | title | created_at | updated_at | id | article_id | category_id | | |
+-----+-----------------+---------------------+---------------------+----+------------+-------------+ | |
| 2 | Cached Models | 2008-11-05 10:28:10 | 2008-11-05 10:28:10 | 1 | 2 | 1 | | |
| 1 | Rails Conf 2009 | 2008-11-05 10:28:10 | 2008-11-05 10:28:10 | 2 | 1 | 1 | | |
+-----+-----------------+---------------------+---------------------+----+------------+-------------+ | |
# MySQL | |
SELECT * FROM `articles` INNER JOIN `articles_categories` ON `articles`.id = `articles_categories`.article_id WHERE (`articles_categories`.category_id = 1 ) | |
+----+-----------------+---------------------+---------------------+----+------------+-------------+ | |
| id | title | created_at | updated_at | id | article_id | category_id | | |
+----+-----------------+---------------------+---------------------+----+------------+-------------+ | |
| 2 | Cached Models | 2008-11-05 11:06:43 | 2008-11-05 11:06:43 | 1 | 2 | 1 | | |
| 1 | Rails Conf 2009 | 2008-11-05 11:06:43 | 2008-11-05 11:06:43 | 2 | 1 | 1 | | |
+----+-----------------+---------------------+---------------------+----+------------+-------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment