You have a SQL query that combines customer data and order data. The query includes calculated columns. You need to create a database object that would allow other users to rerun the same SQL query. What should you create?
A. Incorrect. An index is used to improve the speed of data retrieval and does not store a query or combine tables.
B. Correct. A view is a virtual table based on a SQL query that combines data from multiple tables and can include calculated columns. Other users can rerun the query by simply querying the view, making it an ideal choice for reusing a specific query.
C. Incorrect. A scalar function returns a single value based on input parameters, not a result set of combined data from multiple tables.
D. Incorrect. A table stores data but does not directly store a query. Creating a table would require duplicating data rather than reusing a specific query.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
puksometron
Highly Voted 3 years, 1 month agoheenak55
Highly Voted 2 years, 7 months agoman5484
Most Recent 1 week, 5 days agothe_jigglypuff
1 month, 2 weeks agotoussdev
7 months, 1 week agoAGTraining
9 months agotrashbox
1 year agokjszala
1 year, 2 months agoTKC_2023
1 year, 2 months agohcq31818
1 year, 2 months agoAZFabio
1 year, 2 months agoMannyJZ
1 year, 3 months agoakhil5432
1 year, 3 months agorohirag
1 year, 4 months agoVNR25
1 year, 4 months agovicks60
1 year, 7 months agochiiiweiii
1 year, 8 months ago