Skip to content

Instantly share code, notes, and snippets.

@Guibzs
Last active January 25, 2019 13:07
Show Gist options
  • Select an option

  • Save Guibzs/6c83d03e55fc2617cf7b4903737821d0 to your computer and use it in GitHub Desktop.

Select an option

Save Guibzs/6c83d03e55fc2617cf7b4903737821d0 to your computer and use it in GitHub Desktop.

Revisions

  1. Guibzs revised this gist Jan 25, 2019. No changes.
  2. Guibzs created this gist Jan 25, 2019.
    2 changes: 2 additions & 0 deletions views.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    CREATE OR REPLACE VIEW table_name AS
    SELECT p.title, c.name FROM post AS p INNER JOIN category AS c ON p.category_id = c.ID;