SQL-101-Basics
  • Introduction
  • Part 1: Transact-SQL
    • 1.0: Getting Started with T-SQL
    • 1.1: Create Database
    • 1.2: Drop Database
    • 1.3: Create Table
    • 1.4: Insert
    • 1.5: Update
    • 1.6: Read
    • 1.7: Alter
    • 1.8: Customer Table
    • 1.9: Diagramming Notation
    • 1.10: Foreign Keys
    • 1.11: Join
    • 1.12: Solutions
  • Part 2: PostgreSQL
    • 2.0: Getting Started with PostgreSQL
    • 2.1: Create Database
    • 2.2: Drop Database
    • 2.3: Create Table
    • 2.4: Insert
    • 2.5: Update
    • 2.6: Read
    • 2.7: Alter
    • 2.8: Customer Table
    • 2.9: Diagramming Notation
    • 2.10: Foreign Keys
    • 2.11: Join
    • 2.12: Solutions
  • Part 3: T-SQL Challenges
    • 3.0: Introduction
    • 3.1: Challenge 1
    • 3.2: Challenge 2
    • 3.3: Challenge 3
    • 3.4: Challenge 4
    • 3.5: Solutions
  • Part 4: PostgreSQL Challenges
    • 4.0: Introduction
    • 4.1: Challenge 1
    • 4.2: Challenge 2
    • 4.3: Challenge 3
    • 4.4: Challenge 4
    • 4.5: Solutions
  • Part 5: Resources
    • 5.0: Resources
Powered by GitBook
On this page
  1. Part 1: Transact-SQL

1.8: Customer Table

Previous1.7: AlterNext1.9: Diagramming Notation

Last updated 7 years ago

Without looking back at the previous lessons, create a Customer table with the following criteria:

Name

Type

Null?

CustomerID

int/Primary Key

No

LastName

varchar(25)

No

FirstName

varchar(25)

No

LastPurchase

Datetime

No

Now, insert this data into the table:

CustomerID

LastName

FirstName

LastPurchase

1

Tinney

Zach

5/1/2017 10:17:00

2

Wainscott

Chris

6/2/2017 8:12:00

3

Williams

Jenn

6/5/2017 9:23:00

4

O'Connor

Paul

7/12/2017 11:48:00

5

Rahimzadeh

Auri

1/8/2018 14:34:00

6

Fancher

Dave

3/16/2017 20:56:00

7

Handshoe

James

4/24/2017 19:09:00

Click on to see the solution for this challenge. Then, continue to .

Part 1.9: Diagramming Notation
1.12 Solutions