<em>Queries to get data from sakila database using Structured Query Languange (SQL):
</em>
<em>Assuming that you have created a Database already, with tables in it, containing at least 50 records and these fields:
</em>
<em>
</em>
<em>ACTOR_LASTNAME, ACTOR_FIRSTNAME, FILM_TITLE
</em>
<em>
</em>
<em>Take note that the database and table name is both "sakila".
</em>
<em>1. We can fetch, display or get data using SELECT command or query. Let's type the command like this:
</em>
<em>
</em>
<em>SELECT ACTOR_LASTNAME, ACTOR_FIRSTNAME, FILM_TITLE FROM sakila </em>
<em>
</em>
<em>The command above is called SELECT command that would allow you to display records inside your table. Normally SQL programmers would execute SELECT * command, but since we are just required to display three (3) columns only, then we could just select the column names for our data display. Your columns are: SELECT ACTOR_LASTNAME, ACTOR_FIRSTNAME and FILM_TITLE.
</em>
<em>
</em>
<em>2. For the second command or query, we can execute this: </em>
<em />
<em>SELECT ACTOR_LASTNAME FROM sakila WHERE ACTOR_LASTNAME 'M%' ORDER BY ACTOR_LASTNAME . </em>
<em />
<em>The select where command is like a conditional statement (IF). Where is the statement used to display ACTOR_LASTNAME field starting with letter M. The ORDER BY command is the arrangement of the names in alphabetical order. </em>
<em />