Welcome -
Guest!
Login
/
Register Now
|
Search:
Home
Articles
Forum
Interview FAQ
Activities
News
Videos
Poll
Links
People
Groups
SQL Server Articles
Submit Article
Home
»
Articles
»
SQL Server
»
Math Functions
RSS Feeds
SQUARE Function
Posted By:
Sarita Patel
Category:
SQL Server
Views:
5678
This article explains SQUARE function of sql server with examples.
SQUARE function is used to calculate square of specified number.
Syntax of SQUARE Function :
SQUARE (
float_expression
)
float_expression
is a numeric value of type float.
Return type
of SQUARE function is float.
Examples of SQUARE Function :
Example 1 : Use of SQUARE function in select clause
SELECT
SQUARE(5)
Output
25
Above example returns square of specified numeric value 5.
Example 2 : Use of SQUARE function in where clause
SELECT ProductName, UnitPrice
FROM Products
WHERE SQUARE(UnitPrice) > 500
Output
ProductName UnitPrice
Grandma's Boysenberry Spread
25.00
Uncle Bob's Organic Dried Pears 30.00
Northwoods Cranberry Sauce 40.00
Mishi Kobe Niku 97.00
Ikura
31.00
Queso Manchego La Pastora 38.00
Above example displays all products having square of unit price greater than 500.
Share:
Previous Post:
LOG10 Function
Next Post:
EXP Function
Didn't find what you were looking for? Find more on
SQUARE Function
Or get
search suggestion and latest updates
.
Sarita Patel
author of SQUARE Function is from
United States
.
View All Articles
Related Articles and Code:
Program to generate SQUARE ROOT table
Program to calculate square of a given number
Program to print triangle inside square using * (stars)
Program to prepare Square Root Table
Program to find the square and cube of a number
Program to find the square and cube of a number use subroutine
PROGRAM TO DISPLAY THE PATTERN OF SQUARE
Program to implement the least square method
PROGRAM TO FIND SUM OF SQUARE UP TO N NUMBERS
Program to find the area of square
Program that takes a number from user and calculates its logarithm value to the base 10 and e, exponentiation, sin value, cosine value and square root
Program that takes a number from user and calculates its logarithm value to the base 10 and e, exponentiation, sin value, cosine value and square root
program that takes a number from user and calculates its logarithm value to the base 10 and e, exponentiation, sin value, cosine value and square root
Program that computes and display the square of first ten integers. (using for loop)
Program that lets the user type in an algebric expression, ending with a carriage return, that contains round (parenthesis), square, and curly........
program to find and print first N positive integers whose squares are palindormes........
Program to show an example of Hashing using Mid-Square Method.
Program of nesting member functions, private member functions and array of objects
Example 4 of using function and local variables in functions
Program to read numbers from two files using fscanf function and write it in another file using fprintf function in ascending order
Other Interesting Articles in SQL Server:
Logical Operators
Meta Data Functions
RAND Function
Operators in SQL Server
@@DBTS - DBTS Function
FILEPROPERTY Function
SUBSTRING Function
DATEDIFF Function
@@LANGID - LANGID Function
SERVERPROPERTY Function
@@SERVERNAME - SERVERNAME Function
Text and Image Functions
SCOPE_IDENTITY Function
COALESCE Function
TYPEPROPERTY Function
FLOOR Function
SQUARE Function
CHARINDEX Function
@@IDENTITY - IDENTITY Function
@@TEXTSIZE - TEXTSIZE Function
Please enter your Comment
*
*
Comment should be atleast 30 Characters.
Please put code inside [Code] your code [/Code].
Please login to post comment
No Comment Found, Be the First to post comment!
SQL Server
View All
Aggregate Functions
Analytical Functions
Configuration Function...
Constraints
Cursor
Cursor Functions
Data Control Language
Data Definition Lang
Data Manipulation Lang
Data Type
Database
Date Time Functions
Functions
Index
Interview FAQ
Joins
Math Functions
Meta Data Functions
Miscellaneous
Operator
Rowset Functions
Security Functions
Select Query
Sequence
Stored Procedures
String Functions
Sub Query
System Functions
System Statistical Fun...
Text and Image Functio...
Transaction Control La...
Trigger
View
Assembly Language
Artificial Intelligence
C Programming
C++ Programming
Visual C++
OOAD
Cobol
Java
Asp.net MVC
Rest and WCF Services
Entity Framework
Knockout.Js
Unix / Linux / Ubuntu
Networking
OOPs Concept
HTML
Dos
SQL
System Analysis & Design
Gadgets
Internet
CSS
Javascript
.Net Framework
Asp.net
C#
VB.Net
Python
Perl
Oracle
Software Engineering
RDBMS Terms
AJAX Framework
Design Pattern
UML
WPF
WCF
SEO
PowerShell
Visual Studio
WWF
BizTalk Server
Azure
General
Testing
Online Certifications
PHP
My SQL
LinQ
Project Management
Silverlight
XML
MS Office
Windows OS
DHTML
Sharepoint