w3resource
SQL exercises

SQL exercises on movie Database: Find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen'

SQL movie Database: Basic Exercise-10 with Solution

10. Write a query in SQL to find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen'.

Sample table: actor


Sample Solution:

SELECT act_id
FROM actor 
WHERE act_fname='Woody' 
AND act_lname='Allen';

Sample Output:

 act_id
--------
    111
(1 row)

Practice Online


Movie database model

Query Visualization:

Duration:

Query visualization of Find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen' - Duration

Rows:

Query visualization of Find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen' - Rows

Cost:

Query visualization of Find the ID number for the actor whose first name is 'Woody' and the last name is 'Allen' - Cost

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query in SQL to find the list of all those movies with year which include the words Boogie Nights.
Next: SQL SUBQUERIES Exercises on movie Database

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming