Can we rewrite subqueries into simple select statements or
with joins? Example?
Answer Posted / syed sajjad
Yes we can write using Common Table Expression (CTE). A Common Table Expression (CTE) is an expression that can be thought of as a temporary result set which is defined within the execution of a single SQL statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the use of RDBMS?
Which sql server is best?
What is row_number()?
What is bookmark link in ssrs?
What is bit data type?
What is the optimization being performed in oracle and SQL Server?
What is database white box testing?
What causes index fragmentation?
What is the difference in accessing db between sql server vs sql azure?
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
What type of Index will get created after executing the above statement?
what are the different stages of Report Processing?
How is sql used in sql server?
Can we use pragma autonomous_transaction in trigger?
Explain the use of containers in ssis and also their types?