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


Top 5 Contributors of the Month
david stephan

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

What is ORDER BY Syntax?

Posted By :Shashi Ray     Posted Date :September 24, 2009    Points :10   Category :Sql Server 
SELECT "COLUMN_NAME" FROM "TABLE_NAME" [WHERE "CONDITION"] ORDER BY "COLUMN_NAME" [ASC, DESC];


Example:-

SELECT EMPLOYEE_NAME, DESIGNATION, SALARY FROM EMPLOYEE_TABLE ORDER BY DESIGNATION DESC

You can also find related Interview Question to What is ORDER BY Syntax?  below: 

Does omitting the parenthesis make the syntax cleaner?

  
Yes, if "cleaner" to you is fewer characters on the screen. No, if "cleaner" to you is something that appeals to the sense of logic and reason. (More...)

What order they are triggered ?

  
They''re triggered in the following order:

Application_BeginRequest
Application_AuthenticateRequest
Application_AuthorizeRequest
Application_ResolveRequestCache
Application_AcquireRequestState
Application_PreRequestHandlerExecute
Application_PreSendRequestHeaders
Application_PreSendRequestContent
<>
Application_PostRequestHandlerExecute
Application_ReleaseRequestState
Application_UpdateRequestCache
Application_EndRequest. (More...)

What's the difference between tab-order and z-order?

  
Tab-order describes the order of focus as the user moves between controls using the Tab and Shift+Tab keys.This is determined by the control's TabIndex property-set either in the Properties window, or by selecting View | Tab Order and then clicking each control in order. Z-order describes the front-to-back order of controls, and this set in the Designer using the Bring
to Front and Send to Back layout options. Z-order matters when controls visually overlap and also when docking:Those at the back of the z-order will be assigned docking space first. (More...)

Select Syntax

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" (More...)

What is DISTINCT Syntax ?

  
SELECT DISTINCT "COLUMN_NAME" FROM "TABLE_NAME" (More...)

What is a WHARE Syntax?

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" WHERE "CONDITION"

This condition can be a simple condition and no limit to the number of simple conditions. (More...)

What is COMPOUND CONDITION Syntax?

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" WHERE "SIMPLE CONDITION" {[AND|OR] "SIMPLE CONDITION"};


Example:
SELECT EMPLOYEE FROM SALARY_TABLE WHERE SALARY > 23000
OR (SALARY < 6000 AND SALARY > 4000) (More...)

What is IN Syntax?

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" WHERE "COLUMN_NAME" IN ('VALUE1','VALUE2',VALUE3,VALUE4) (More...)

What is MAX Syntax?

  
SELECT MAX("COLUMN_NAME") FROM "TABLE_NAME"; (More...)

What is MIN Syntax?

  
SELECT MIN("COLUMN_NAME") FROM "TABLE_NAME"; (More...)

What is LIKE Syntax?

  
SELECT * FROM "TABLE_NAME" WHERE "COLUMN_NAME" LIKE {PATTERN};


Example:-

SELECT * FROM EMPLOYEE_NAME WHERE EMPLOYEE_NAME LIKE '%SHASHI%'; (More...)

What is BETWEEN Syntax?

  
SELECT * FROM "TABLE_NAME" WHERE "COLUMN_NAME" BETWEEN 'VALUE1' AND 'VALUE2';

Example:-

SELECT * FROM EMPLOYEE_TABLE WHERE SALARY BETWEEN '23000' AND '5000'; (More...)

What is AVG Syntax?

  
SELECT AVG("COLUMN_NAME") FROM "TABLE_NAME";

Example:-
SELECT AVG(SALARY) FROM EMPLOYEE_TABLE (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