Exercise: Data Import and Export
Practice and test your understanding of data import and export.
We'll cover the following...
We'll cover the following...
We will now proceed with the practical work.
Question 1
Given the structure of the Customers
table below:
Field | Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where CustomerID
is the primary key and ReferralID
is self-referencing to CustomerID
. The table contains information about customers.
Consider a CSV file special_customers.csv
where NULL
for Phone
is represented by N/A
and for Address
by an empty field.
CustomerName,Email,Phone,Address,CustomerTier"Test User One","test1@example.com","N/A","",New"Test User Two","test2@example.com","555-9900","77 Test Drv",Regular
Import this data into the Customers
table, ensuring ‘N/A’ for phone becomes NULL
and ...