staff_list
Documentation | Sakila |
Name | staff_list |
Module | Views |
The staff_list view provides a list of all staff members, including address and store information.
The staff_list view incorporates data from the staff and address tables.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | ID | unsigned tinyint(3, 0) | Default: 0 | The staff member ID. | ||||
The staff member ID. Default: 0 |
||||||||
2 | name | varchar(91) | The staff member full name. | |||||
The staff member full name. |
||||||||
3 | address | varchar(50) | The staff member address | |||||
The staff member address |
||||||||
4 | zip code | varchar(10) | The postal code or ZIP code of the address. | |||||
The postal code or ZIP code of the address. |
||||||||
5 | phone | varchar(20) | The telephone number. | |||||
The telephone number. |
||||||||
6 | city | varchar(50) | Name of the city. | |||||
Name of the city. |
||||||||
7 | country | varchar(50) | The name of the country. | |||||
The name of the country. |
||||||||
8 | SID | unsigned tinyint(3, 0) | The store ID. | |||||
The store ID. |
Script
select `s`.`staff_id` AS `ID`,concat(`s`.`first_name`,' ',`s`.`last_name`) AS `name`,`a`.`address` AS `address`,`a`.`postal_code` AS `zip code`,`a`.`phone` AS `phone`,`sakila`.`city`.`city` AS `city`,`sakila`.`country`.`country` AS `country`,`s`.`store_id` AS `SID` from (((`sakila`.`staff` `s` join `sakila`.`address` `a` on((`s`.`address_id` = `a`.`address_id`))) join `sakila`.`city` on((`a`.`city_id` = `sakila`.`city`.`city_id`))) join `sakila`.`country` on((`sakila`.`city`.`country_id` = `sakila`.`country`.`country_id`))) |
Exported: 2018-10-12 17:43, Last imported: 2018-08-06 10:44