Difference between revisions of "Select Queries"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
Line 5: Line 5:
  
 
  <syntaxhighlight lang=sql>
 
  <syntaxhighlight lang=sql>
   SELECT `data` FROM `TABLE`;
+
   SELECT `data` FROM `TABLE`
 +
  WHERE `Condtion`
 +
  ORDERBY `TABLE` ASC / DESC ;
 
  </syntaxhighlight>
 
  </syntaxhighlight>

Revision as of 16:44, 15 December 2016

  • Used for fetching information from an SQL database.
  • 'Outputs' the data once successfully selected
  • Allows selection from multiple tables but not multiple databases.


   SELECT `data` FROM `TABLE`
   WHERE `Condtion`
   ORDERBY `TABLE` ASC / DESC ;