mand that deletes the customers whose date of birth is after 22-Dec-1990.  d. Write a SQL query that displays the number of customers who born on the 16th day of a month. e. Write in SQL a query that

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 6RA
icon
Related questions
icon
Concept explainers
Question

Database course: 

a. Write in SQL a command that creates the table Customers according to the above description. 

b. Write in SQL a statement that adds a new column named accountID of type Char(8). This column should be defined as a foreign key that relates the table Customers to the table Account.

c. Write in SQL a command that deletes the customers whose date of birth is after 22-Dec-1990. 

d. Write a SQL query that displays the number of customers who born on the 16th day of a month.

e. Write in SQL a query that displays the ids of the customers who have the highest income.

f. Create a view named ‘customerDetails’ to hold all the details of customers whose first names start with ‘S’ and their incomes are between 500 and 1000 Omani Rials. 

 

(I need the codes to copy them please)

Photo is there. 

Table name: Customers
Columa Name
customerID
cutF Name
Rele
ores the ID of a customer Char
stores the first name of a
customer
Stores the last name of a
Data Type
Length
Constraint
Primary key
Carnot be nul
Varchar
35
custLName
Varchar?
35
Cannot be ull
customer
custGender
Store the gender ofa
cuitomer
Stores the date of buth of
Acustomer
Store the income ofa
cutomer
Char
It should be Mf
or 'F
cutDOB
Date
custincome
Number
Transcribed Image Text:Table name: Customers Columa Name customerID cutF Name Rele ores the ID of a customer Char stores the first name of a customer Stores the last name of a Data Type Length Constraint Primary key Carnot be nul Varchar 35 custLName Varchar? 35 Cannot be ull customer custGender Store the gender ofa cuitomer Stores the date of buth of Acustomer Store the income ofa cutomer Char It should be Mf or 'F cutDOB Date custincome Number
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage