.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 BETWEEN Syntax?

Posted By :Shashi Ray     Posted Date :September 24, 2009    Points :10   Category :Sql Server 
SELECT * FROM "TABLE_NAME" WHERE "COLUMN_NAME" BETWEEN 'VALUE1' AND 'VALUE2';

Example:-

SELECT * FROM EMPLOYEE_TABLE WHERE SALARY BETWEEN '23000' AND '5000';

You can also find related Interview Question to What is BETWEEN 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...)

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 ORDER BY Syntax?

  
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 (More...)

What is AVG Syntax?

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

Example:-
SELECT AVG(SALARY) FROM EMPLOYEE_TABLE (More...)

What is COUNT Syntax?

  
SELECT COUNT("EMPLOYEE_NAME") FROM "EMPLOYEE_TABLE";
or
SELECT COUNT(*) FROM "EMPLOYEE_TABLE";


COUNT is arithmetic function, This is return number of row. (More...)

COUNT and DISTINCT Syntax?

  
SELECT COUNT(DISTINCT EMPLOYEE_NAME) FROM EMPLOYEE_TABLE;

Fetch the number of distinct entries in a 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