Create a view named 'owner_details' to select the owner_name and contact_number of the buildings with the length of owner_name greater than 15.Note:1. Do not change the name of the view2. Include only the column named owner name and contact number present in the building table. Select only the records with the length of owner_name greater than 15.3. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Question
Create a view named 'owner_details' to select the owner_name and contact_number of the buildings with the length of owner_name greater than 15.Note:1. Do not change the name of the view2. Include only the column named owner name and contact number present in the building table. Select only the records with the length of owner_name greater than 15.3. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Solution
The language of the text is SQL (Structured Query Language), which is used for managing and manipulating databases. Here is the CREATE VIEW query based on your requirements:
CREATE VIEW owner_details AS
SELECT owner_name, contact_number
FROM buildings
WHERE LENGTH(owner_name) > 15;
This query creates a view named 'owner_details' that includes the 'owner_name' and 'contact_number' columns from the 'buildings' table, but only for those records where the length of the 'owner_name' is greater than 15.
Similar Questions
reate a view named "building_owners" to select all the owner_name present in the building table.Note:1. Do not change the name of the view2. Include only the column named owner_name present in the building table3. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Create a view named 'building_details' to select all the details present in the building table.Note:1. Do not change the name of the view2. Include all the column and rows present in the building table3. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Create a view named 'meter_details' to select all the details of the buildings whose meter_number starts with 'SG' and ends with '2'.Note:1. Do not change the name of the view2. Include all the columns present in the building table. Select only the building with the meter_number starts with 'SG' and ends with '2'.3. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Create a view named "home_buildings" to select the name of the building_type whose electricity connection type is ‘Home’.Note:1. Do not change the name of the view2. Include only the name column present in the building_type table. Select only the building_type with the electricity connection type name as ‘Home’.3. Use subquery. Tables involved are building_type and electricity_connection_type4. Submit only the CREATE VIEW query.Instructions:1. Create the view successfully2. Once the view is created, check the correctness of the virtual table by displaying all the records in it.3. DO NOT submit the select query. Submit only the CREATE VIEW query.Sample Output:Created view will contain the following same data:
Write a query to display the owner_name and contact_number of all building, Display the records in ascending order based on owner_name.Note:1. Display only the column named ‘owner_name’ and ‘contact_number’ present in the building table.2. Order by is mandatory
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.