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
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
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.
Step by step
Solved in 2 steps