Appendix

About

This section is included to assist the students to perform the activities present in the book. It includes detailed steps that are to be performed by the students to complete and achieve the objectives of the book.

1. SQL Basics

Activity 1.01: Inserting Values into the Products Table in the PACKT_ONLINE_SHOP Database

Solution:

  1. Create the Products table with the same column names that were provided in the Excel spreadsheet:

    use packt_online_shop;

    CREATE TABLE Products

    (

        ProductID INT NOT NULL,

        ProductCategoryID INT NOT NULL,

        SupplierID INT NOT NULL,

        ProductName CHAR(50) NOT NULL,

        NetRetailPrice DECIMAL(10, 2) NULL,

        AvailableQuantity INT NOT NULL,

        WholesalePrice DECIMAL(10, 2) NOT NULL,

        UnitKGWeight DECIMAL(10, ...

Get The SQL Workshop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.