Beginning SQL

Beginning SQL Beginning SQL

marjan.fesb.hr
from marjan.fesb.hr More from this publisher
20.07.2013 Views

Appendix B 442 Figure B-78 Chapter 1 already contains all the SQL for adding tables to the example database, and Chapter 2 covers how to insert data. This appendix simply demonstrates how to create one new table, add two rows to it, and then delete the table. Don’t worry if the SQL itself doesn’t make sense; it does once you’ve read Chapters 1 through 3. Some commands, such as CREATE DATABASE, affect the database system rather than a particular database. However, nearly all of the SQL in this book is aimed at the Film Club database. To ensure that queries are executed against the Film Club database, you can either select Film Club from the dropdown menu in the middle of the toolbar or type and execute the following command: USE FILMCLUB; Type the following statement into the large textbox at the top of the Query Browser: CREATE TABLE MyTable (MyColumn int)

Appendix B<br />

442<br />

Figure B-78<br />

Chapter 1 already contains all the <strong>SQL</strong> for adding tables to the example database, and Chapter 2 covers<br />

how to insert data. This appendix simply demonstrates how to create one new table, add two rows to it,<br />

and then delete the table. Don’t worry if the <strong>SQL</strong> itself doesn’t make sense; it does once you’ve read<br />

Chapters 1 through 3.<br />

Some commands, such as CREATE DATABASE, affect the database system rather than a particular<br />

database. However, nearly all of the <strong>SQL</strong> in this book is aimed at the Film Club database. To ensure that<br />

queries are executed against the Film Club database, you can either select Film Club from the dropdown<br />

menu in the middle of the toolbar or type and execute the following command:<br />

USE FILMCLUB;<br />

Type the following statement into the large textbox at the top of the Query Browser:<br />

CREATE TABLE MyTable (MyColumn int)

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

Saved successfully!

Ooh no, something went wrong!