Question
CREATE OR REPLACE VIEW high _ salary _ employees AS
SELECT employee _ id, salary FROM employees WHERE salary > 50000; Which statement about the view high _ salary _ employees is true?Solution
A SQL view is a virtual table that reflects the results of a query in real-time. 1. Dynamic Nature: A view does not store data itself but retrieves data dynamically from the underlying table when queried. 2. Purpose: The high _ salary _ employees view reflects any updates made to the employees table that meet the specified condition (salary > 50000). 3. Real-Time Updates: Changes to the employees table are automatically visible in the view without needing to recreate it. This behavior makes views ideal for abstraction and encapsulation in SQL. Why Other Options Are Incorrect: β’ A) The view stores a copy of the data in the database: A view is virtual and does not store data physically. β’ B) The view must be recreated if the employees table is updated: The view dynamically reflects updates to the employees table. β’ D) The view can be used to perform DML operations directly on employees: Views are read-only unless explicitly defined as updatable. β’ E) The view is static and cannot be updated: Views are dynamic and reflect real-time data.
The monthly income of B is 25% more than that of A. If the income of B is Rs. 42000 and A saves 40% of his monthly income, then find Aβs expenditure.
A student has to secure 40% marks to pass an examination. He gets 150 marks and fails by 30 marks. What are the maximum marks?
In a school election between two candidates, 12% of the total votes were invalid. Of the valid votes, the winner got 58% and won by 1,392 votes. Find th...
- In a university examination, the passing marks are set at 50%. Marks obtained by βXβ are 12% less than the passing marks, and βYβ scores 30% marks ...
Income of A is 60% of the Income of B and A together. The saving of B is 32% of his Income and equals to Rs. 12800. Find the difference between the inco...
The population of a village increase at the rate of 10% during the first year and decreases at the rate of 20% during the second year. If it has 20240 i...
The total number of students in a college is 13,200. If the number of male students increases by 30% and the number of female students increases by 20% ...
Rihan spends 40% of his salary, which is Rs. 1200 more than the amount he would spend if he spent 30% of his salary. What is the total salary of Rihan?
Amit scored 80 marks in subject X. He scored 60% marks in subject B and Y marks in subject D. Maximum marks in each subject was 300. The overall percent...
50% students (boys + girls) in a math class are boys. Out of total boys, 65% are literate and 70 are illiterate. Find the number of literate girls in th...