Custom Search
 


The Shippers table in MySQL Northwind database


The Shippers table stores shipping companies data who transport products from Northwind Traders to its customers.
  • PRIMARY KEY is ShipperID and it's auto incremented. ShipperID is also a column in Orders table as a foreign key column.
  • VARCHAR columns are defined as NOT NULL with a DEFAUTL constraint ''.
  • Character type columns are defined as UTF8 to allow non English characters to be stored.

Data view of Shippers table

To create Order_Details table, run the following CREATE and INSERT INTO statement.

USE `northwind`;

-- Table structure for table `shippers`

DROP TABLE IF EXISTS `shippers`;

CREATE TABLE `shippers` (
`ShipperID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`CompanyName` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`Phone` varchar(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`ShipperID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- Data for the table `shippers`
insert into `shippers`(`ShipperID`,`CompanyName`,`Phone`)
values (1,'Speedy Express','(503) 555-9831'),
(2,'United Package','(503) 555-3199'),
(3,'Federal Shipping','(503) 555-9931');

Happy Coding!



Other tutorials in this category

1. What is Northwind database in MySQL

2. Create Northwind database in MySQL

3. The Categories table in MySQL Northwind database

4. The Suppliers table in MySQL Northwind database

5. The Products table in MySQL Northwind database

6. The Customers table in MySQL Northwind database

7. The Employees table in MySQL Northwind database

8. The Orders table in MySQL Northwind database

9. The Order Details table in MySQL Northwind database

10. SQL Views in MySQL Northwind database

Back to Tutorial Index Page


Copyright © 2024 GeeksEngine.com. All Rights Reserved.

This website is hosted by HostGator.

No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it.

 
Home | Feedback | Terms of Use | Privacy Policy