Welcome to our free SQL tutorial. This tutorial is based on Webucator's Introduction to SQL Training course.
In this exercise, you will practice inserting records.
Employees
table.LastName
, FirstName
, Title
, TitleOfCourtesy
,
BirthDate
, HireDate
, City
, Region
,
PostalCode
, Country
, HomePhone
, ReportsTo
Orders
table.CustomerID
, EmployeeID
, OrderDate
, RequiredDate
Order_Details
table.OrderID
, ProductID
, UnitPrice
, Quantity
, Discount
/****************************** Oracle Solution ******************************/ INSERT INTO Employees (EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, City, Region, PostalCode, Country, HomePhone, ReportsTo) VALUES(10, 'Dunn','Nat','Trainer','Mr.', '01-Feb-1970','04-Mar-1997','Jamesville','NY', '13078','USA','315-555-5555','1'); /****************************** SQL Server & MySQL Solution ******************************/ INSERT INTO Employees (LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, City, Region, PostalCode, Country, HomePhone, ReportsTo) VALUES('Dunn','Nat','Trainer','Mr.', '1970-02-01','1997-03-04','Jamesville','NY', '13078','USA','315-555-5555','1'); /****************************** Oracle Solution ******************************/ INSERT INTO Orders (OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate) VALUES(11078, 'COMMI',10,'24-May-2004','12-Jul-2005'); /****************************** SQL Server & MySQL Solution ******************************/ INSERT INTO Orders (CustomerID, EmployeeID, OrderDate, RequiredDate) VALUES('COMMI',10,'2005-05-24','2005-07-12'); INSERT INTO Order_Details (OrderID, ProductID, UnitPrice, Quantity, Discount) VALUES(11078, 3, 10, 100, .1); /* SQL Server users will replace Order_Details with "Order Details" */
This tutorial is based on Webucator's Introduction to SQL Training Course. We also offer many other SQL Training courses. Sign up today to get help from a live instructor.