Skip to content

Latest commit

 

History

History
104 lines (57 loc) · 3.52 KB

File metadata and controls

104 lines (57 loc) · 3.52 KB

0x0E. SQL - More queries

Description

What you should learn from this project:

  • How to create a new MySQL user
  • How to manage privileges for a user to a database or table
  • What’s a PRIMARY KEY
  • What’s a FOREIGN KEY
  • How to use NOT NULL and UNIQUE constraints
  • How to retrieve datas from multiple tables in one request
  • What are subqueries
  • What are JOIN and UNION

  • Write a script that lists all privileges of the MySQL users user_0d_1 and user_0d_2 on your server (in localhost).
  • Write a script that creates the MySQL server user user_0d_1.
  • Write a script that creates the database hbtn_0d_2 and the user user_0d_2.
  • Write a script that creates the table force_name on your MySQL server.
  • Write a script that creates the table id_not_null on your MySQL server.
  • Write a script that creates the table unique_id on your MySQL server.
  • Write a script that creates the database hbtn_0d_usa and the table states (in the database hbtn_0d_usa) on your MySQL server.
  • Write a script that creates the database hbtn_0d_usa and the table cities (in the database hbtn_0d_usa) on your MySQL server.
  • Write a script that lists all the cities of California that can be found in the database hbtn_0d_usa.
  • Write a script that lists all cities contained in the database hbtn_0d_usa.
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download
  • Import the database dump of hbtn_0d_tvshows to your MySQL server: download (same as 10-genre_id_by_show.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 11-genre_id_all_shows.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 12-no_genre.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 13-count_shows_by_genre.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 14-my_genres.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 15-comedy_only.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 16-shows_by_genre.sql)
  • Import the database dump from hbtn_0d_tvshows to your MySQL server: download (same as 100-not_my_genres.sql)
  • Import the database hbtn_0d_tvshows_rate dump to your MySQL server: download
  • Import the database dump from hbtn_0d_tvshows_rate to your MySQL server: download (same as 102-rating_shows.sql)

Author