Use the following table to answer the questions below: Table name: Customers Column Name Role Data Type Length Constraint customerID stores the ID of a Char 5 Primary key customer custFName stores the first name of a Varchar2 35 Cannot be null customer custLName Stores the last name of a Varchar2 35 Cannot be null customer custGender Store the gender of a Char 1 It should be M customer or 'F' custDOB Stores the date of birth of Date a customer custIncome Store the income of a Number customer 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
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps