.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

Can We Rewrite Subqueries Into Simple Select Statements Or With Joins?

Posted By :Ghanashyam Nayak     Posted Date :December 03, 2010    Points :15   Category :Sql Server 
Subqueries can often be re-written to use a standard outer join, resulting in faster performance. As we may know, an outer join uses the plus sign (+) operator to tell the database to return all non-matching rows with NULL values. Hence we combine the outer join with a NULL test in the WHERE clause to reproduce the result set without using a sub-query.

You can also find related Interview Question to Can We Rewrite Subqueries Into Simple Select Statements Or With Joins?  below: 

What are the ways available in SQL Server to execute SQL statements?


SQL Server uses different ways to execute SQL statements which are listed below.

1)Single SQL statement processing
2)Batch processing
3)Stored procedure and trigger execution
4)Execution plan caching and reuse
5)Parallel query processing


can you tell all types of joins?

1) equi joins
2) non equi joins
3) self joins
4) caresian joins
5) outer joins
-full (More...)

Select Syntax


Write and justify output of - select nullif('test','test')

The output will be - NULL
Justification : nullif returns NULl if given two arguments are same else returns the first specified argument. So, for the given SQL, output will be NULL. (More...)

What does break and continue statements do in JavaScript?

Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop in JavaScript. (More...)

Difference between Set and Select keyword in sql server?


1.Set is a ANSI standard for variable assignment.
2.We can assign only one variable at a time
3.When assigning from a query that returns more than one value, SET will fail with an error.


1.Select is a Non-ANSI standard when assigning variables.
2.We can assign multiple variable at a time
3.When assigning from a query that returns more than one value, SELECT will assign the last value returned by the query and hide the fact that the query returned (More...)

How to Select a value from Dataset?

By Using DataTable.Selet() Method? (More...)

Write a query to Select top 2 Highest salaries?

select Top(2) salary from Tablename order by Salary desc.... (More...)

Consider the following code:

public class Example extends Thread
public void run()
System.out.println ("Hello");

public static void main (String args[])
new Example();

Select the correct option regarding the preceding code ?

1, The code will not compile.
2, The code will compile but will not execute.
3, The code will compile, execute, and display Hello as the output.
4, The code will compile, execute, but will not display anything.

Answer : 4 (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend