Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SQL Basics - RRUG 1/6/2016

kickinbahk
January 06, 2016

SQL Basics - RRUG 1/6/2016

Overview of SQL and basic syntax.

kickinbahk

January 06, 2016
Tweet

More Decks by kickinbahk

Other Decks in Technology

Transcript

  1. A collection of data items organized as a set of

    formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables.
  2. Each row contains a unique instance of data for the

    categories defined by the columns.
  3. Two keywords: we need to SELECT information FROM a table.

    SELECT "column_name" FROM "table_name"; Syntax:
  4. To grab a distinct element, all we need to do

    is to add DISTINCT after SELECT
  5. Different Joins INNER JOIN: Returns all rows when there is

    at least one match in BOTH tables LEFT JOIN: Return all rows from the left table, and the matched rows from the right table
  6. Different Joins RIGHT JOIN: Return all rows from the right

    table, and the matched rows from the left table FULL JOIN: Return all rows when there is a match in ONE of the tables
  7. Resources Zed Shaw’s Learn SQL the Hard Way: http://sql.learncodethehardway.org/ book/introduction.html

    Use the Index Luke: http://use-the-index-luke.com/sql/table- of-contents