Changes

Jump to navigation Jump to search
796 bytes added ,  00:04, August 3, 2010
added examples
Line 10: Line 10:     
Transactions exhibit their own properties such as an [[isolation level]]. The transaction [[isolation level]] determines the level of interactivity with other concurrently running transactions. By default each transaction is conceptually isolated from all other transactions, thereby preventing two (or more) transactions from concurrently reading and/or updating the same data records.
 
Transactions exhibit their own properties such as an [[isolation level]]. The transaction [[isolation level]] determines the level of interactivity with other concurrently running transactions. By default each transaction is conceptually isolated from all other transactions, thereby preventing two (or more) transactions from concurrently reading and/or updating the same data records.
 +
 +
== Example Queries ==
 +
SQL statements come in many forms, but the most common types are SELECT, INSERT, and UPDATE.  DELETE is also used, but far less frequently.
 +
 +
<pre>SELECT * FROM customer_data WHERE customer_id = 5;</pre>
 +
This would be used by an application to read information about a specific customer.
 +
 +
<pre>UPDATE customer_data SET customer_firstname = 'Joe' WHERE customer_id = 5;</pre>
 +
This statement simply sets the name of customer 5 to be Joe.
 +
 +
<pre>INSERT customer_data (customer_name, customer_username, customer_password) VALUES ('Mary', 'Mary7', MD5('password'));</pre>
 +
Adding a new customer named Mary.  Her password is MD5 hashed for security purposes.
 +
 +
<pre>DELETE FROM customer_data WHERE customer_id = 15;</pre>
 +
Whoever customer 15 is, their account has just been deleted.
    
==References==
 
==References==
50

edits

Navigation menu