Question
I need help on the following SQL questions. 1.The following is the correct code to create a view: a. CREATE VIEW kljview AS b. CREATE
I need help on the following SQL questions.
1.The following is the correct code to create a view:
a. CREATE VIEW kljview AS
b. CREATE OR REPLACE VIEW kljview
c. CREATE kljview
d. REPLACE VIEW kljview
2. Which of the following is/are correct to give an alias for a column? Use the table Dual to check your answer!
a. SELECT sysdate ''Bach'' s' '' Home''
b. SELECT sysdate 'Beethoven's Home'
c. SELECT sysdate ''Brahms''s Home''
d. SELECT sysdate 'Mozart' Home' e. SELECT sysdate ''Katherine's Home''
3. Choose which letter accurately describes the relationship of the following entities
a. 0:0
b. 1:0
c. 1:1
d. 1:M e. M:M
4. The SQL code: SELECT &last_name, &first_name from employees;
a. involve substitution variables
b. asks for direct user input
c. will be ignored by the server
d. a and b
e. b and c
5. Marge enters the following date in RR format for the employees date of birth: 25-Dec-25 Marge enters this information on September 26th, 2051. What is the year of birth as recognized by Oracle?
a. 2025
b. 2005
c. 1925
d. 1905
e. 2125
6. Only primary and foreign keys have the constraint NULL.
a. True
b. False
7. The column heading is used to customize what the reader will see for the name of the column field.
a. True
b. False
8. To determine the total of all the employees of department_id = 90 using the table called employees, the SQL code is SELECT TOTAL(last_NAME) FROM employees WHERE department_id=90;
a. True b. False
9.What does the following query yield?
SELECT last_name, first_name, Oracle_test_score FROM students Where Oracle_test_score > (SELECT AVG(Oracle_test_score) from students)
10. . Concatenate the result returned by the following number functions.
ROUND(112.199,-2), TRUNC(112.199,-2)
11. . What are the number of days to reach the day after January 1st, 2017?
12. What is the proper code to format a column that contains numbers to represent currency? Once you have determined the format, use the code to format the number 500 to represent currency to the second decimal.
13. Give the code to concatenate the following two fields:
Catalog_ID, Catalog_Desc
14. . Name at least two reasons to construct a View.
15. Give two examples of using the CHECK constraint.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started