Changes

Jump to navigation Jump to search
683 bytes added ,  15:14, March 9, 2017
added an extended example
Line 26: Line 26:  
Whoever customer 15 is, their account has just been deleted.
 
Whoever customer 15 is, their account has just been deleted.
    +
===Select===
 +
As a further example, suppose a database contains only the following table:
 +
{| class="wikitable"
 +
|-
 +
! customer_id !! last_name !! first_name !! city
 +
|-
 +
| 10039 || Smith || John || Huston
 +
|-
 +
| 10178 || Cole || Christen || Wortham
 +
|-
 +
| 10052 || Franks || Andrew || Austin
 +
|-
 +
| 10131 || Klinfelt || Mark || Thornberry
 +
|-
 +
| 10014 || Franklin || Mary || Austin
 +
|}
 +
If the following query is run:
 +
<pre>
 +
SELECT *
 +
FROM customers
 +
WHERE city = 'Austin'
 +
ORDER BY last_name ASC;
 +
</pre>
 +
 +
then these results would be returned:
 +
{| class="wikitable"
 +
|-
 +
! customer_id !! last_name !! first_name !! city
 +
|-
 +
| 10014 || Franklin || Mary || Austin
 +
|-
 +
| 10052 || Franks || Andrew || Austin
 +
|}
 
==References==
 
==References==
 
<references/>
 
<references/>
    
[[Category:Programming Languages]]
 
[[Category:Programming Languages]]
Block, SkipCaptcha, Upload, Automoderated users, Check users, delete, edit, Moderators, move, oversight, protect, ratelimit-exempt, rollback, Administrators
20,330

edits

Navigation menu