Adventures with MySQL

Time to get my hands dirty in a database. I created stalviesn2 (pretty easy …) and from there, imported the demo file and tried out some SQL commands.

eg.

SELECT title, cost
FROM books
ORDER BY title

which … lists the title and cost of each book in the database.

SELECT *
FROM books
WHERE cost > 10
ORDER BY title

which … gives me the two books over $10.

DELETE FROM books
WHERE title = ‘War and Peace’

which … gets rid of Tolstoy from the list. Not enough time to read with all the stuff to do for DMT this semester ;o)

Good usability in that I’m asked first if I really want to delete the book.

More to follow …

Leave a Reply

Your email address will not be published. Required fields are marked *