20.07.2013 Views

Beginning SQL

Beginning SQL

Beginning SQL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Query Analyzer allows you to enter one or more queries and to save and load queries to or from a file.<br />

Each statement must end with a semicolon. Once a statement is entered and you’re happy with it, click<br />

the Execute button; usually this is the second icon to the left of the database selector drop-down menu,<br />

and although you can’t see it from the screenshot, it’s actually an icon with a green triangle. You can also<br />

hit the F5 key to execute a query. The first task is to create the Film Club database. Enter the following<br />

<strong>SQL</strong> into the <strong>SQL</strong> box, as shown in Figure B-75:<br />

CREATE DATABASE FILMCLUB;<br />

Figure B-75<br />

Setting Up and Using the Five Database Systems<br />

This is not a query that returns information; rather, it is <strong>SQL</strong> that changes the database system, in this<br />

case adding a new database. After a few seconds, the database is created and the results screen (see<br />

Figure B-76) lets you know whether your attempt was successful:<br />

439

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!