I’m working on a mysql exercise and need a sample draft to help me understand better.
For your Lesson 4 Hands-On, you will be working with your new knowledge on SQL queries. This Hands-On will be graded, so be sure you complete all requirements. Please read through the below setup instructions before starting your project.
This Hands-On is structured into two parts, and each part may ask you to run multiple queries. After each query, please take a screenshot of the MySQL output and add it to a Word document (or an equivalent) and name this file
SQL-HandsOn4. This way, you will be able to submit your answers to each part all at once.
Now you are ready to get started! Good luck!
Run the following queries:
- Create a view named “initialCustomers” that shows the first name, last name, and email address of customers that have an id of less than 100. Once that is complete, select and view your newly created view.
Complete the following:
Create a table named “ProductList”. Include the following columns:
Include the following requirements:
- Every product should have an automatically generated id number that should be unique for each product.
- Give each column a data type that would apply
- Give the DateAdded column a default value for the current local time.
- All columns CANNOT be null.
Next, insert one product into the table following the given guidelines when the table was created. When inserting the data, don’t include the
ProductId or the
DateAdded. Finally, run a query to see the single product in your table.