What are Scalar functions?

A function in SQL is a subprogram that is used to perform an action such as complex calculations and returns the result of the action as a value. It takes one or more arguments as input then processes the arguments and returns an output.

sql dba training

AGGREGATE Functions.

SCALAR Functions.

SCALAR Functions and AGGREGATE Functions both return a single value result.
AGGREGATE Functions operate on many records while SCALAR Functions operate on each record independently.

The functions which return only a single value from an input value are known as a scalar function

Scalar functions may take single or multiple arguments, but they always return a single-valued result which is mandatory. The returned values of the Scalar function can be of any data type.


Some SCALAR Functions in SQL

UCASE

LCASE

MID

ROUND

LEN

FORMAT

UCASE

SQL function UCASE() converts all the characters of a string to uppercase. It is a synonym for the upper case. It takes one argument and returns back only a single value.

It converts the value of a field to uppercase. It works on the values of all the data types and converts the string in the values to uppercase.

Syntax

For example:

LCASE

SQL function LCASE() converts all the characters of a string to lowercase. It is a synonym for the lower case. It takes one argument and returns back only a single value.

It converts the value of a field to lowercase. It works on the values of all the data types and converts the string in the values to lowercase.

Syntax

For example:

MID

SQL function MID() extracts texts from the value of a field. It takes one argument and works on each value independently.

It works on the values of all the data types.

Syntax

If the number of characters in the text of a field are less then the specified length, then space is appended at the end of the text.

For example:


ROUND

The ROUND() function is used to round a numeric field to the number of decimals specified.

It works on the values of numeric data types.

Syntax

For example:

LEN

The LEN() function is used to return the length of the value in the field. It counts the number of characters along with spaces and returns a single value integer.

It works on the values of all data types.

Syntax

For example:

FORMAT

The FORMAT() function is used to format the contents of a field. It is used to specify how the contents of the field should be displayed or returned.

It works on the values of all data types.

Syntax

For example:

That's all about Scalar Functions. Hope you learned something new today.

SQL server dba online course

Cards you may also be interested in
Satisfied with Online Case Study Assignment Help
luselrakesh
1
0
0
Alaska Airlines Flight Reservations, Alaska Airline is one of the best airlines in the whole wide world and there is a very big reason behind it. As Alaska Airlines Reservations offers its customers the best in class services at unbelievable prices.
sarashepard2808
2
0
0
http://www.talad-pra.com/goto.php?url=https://sites.google.com/view/earn-paytm-cash/ http://www.redrice-co.com/page/jump.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.solutionskills.com/exit.php?title=StudyAche&url=https://sites.google.com/view/earn-paytm-cash/ https://www.wescomfinancial.com/info/redirect.aspx?url=https://sites.google.com/view/earn-paytm-cash/ https://www.footballzaa.com/out.php?url=https://sites.google.com/view/earn-paytm-cash/ http://www.serbiancafe.com/lat/diskusije/new/redirect.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.girisimhaber.com/redirect.aspx?url=https://sites.google.com/view/earn-paytm-cash/ http://sergiubaluta.com/site/redirect.php?url=https://sites.google.com/view/earn-paytm-cash/ http://infosmi.com/redirect.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.manacomputers.com/redirect.php?blog=B8B2B8ADB89EB8%B4B880B88C&url=https://sites.google.com/view/earn-paytm-cash/ https://tieba.baidu.com/mo/q/checkurl?url=https://sites.google.com/view/earn-paytm-cash/ http://new.0points.com/wp/wp-content/plugins/wp-js-external-link-info/redirect.php?url=https://sites.google.com/view/earn-paytm-cash/ https://ultramar-ti.com/redirect/Index.asp?url=https://sites.google.com/view/earn-paytm-cash/ https://www.merkfunds.com/exit/?url=https://sites.google.com/view/earn-paytm-cash/ http://www.zhouyiworld.com/home/link.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.tacomaworld.com/out/?url=https://sites.google.com/view/earn-paytm-cash/ http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=928532-0000&PA=2298149&HTML=https://sites.google.com/view/earn-paytm-cash/ https://www.anphabe.com/go.php?url=https://sites.google.com/view/earn-paytm-cash/ http://www.ighome.com/redirect.aspx?url=https://sites.google.com/view/earn-paytm-cash/ https://go.pnuna.com/go.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.hyiphistory.com/visit.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.em-lyon.com/fr/emlyon/redirect?url=https://sites.google.com/view/earn-paytm-cash/ http://www.dicodunet.com/out.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.autosportinternational.com/redirect?link=https://sites.google.com/view/earn-paytm-cash/ http://jan.myvnc.com/uc1.5/home/link.php?url=https://sites.google.com/view/earn-paytm-cash/ http://c.yam.com/msnews/IRT/r.c?https://sites.google.com/view/earn-paytm-cash/ http://www.perepel.com/forum/go.php?https://sites.google.com/view/earn-paytm-cash/ https://1.xg4ken.com/media/redir.php?prof&camp&affcode&cid&networkType=search&url[]=https://sites.google.com/view/earn-paytm-cash/ http://konga.postaffiliatepro.com/scripts/click.php?k_id=9janinja&desturl=https://sites.google.com/view/earn-paytm-cash/ https://www.brandonsun.com/s?action=editReg&rurl=https://sites.google.com/view/earn-paytm-cash/ http://www.dcfever.com/click.php?id=lensdb_fbs&url=https://sites.google.com/view/earn-paytm-cash/ https://www.resaero.com/redirect.php?url=https://sites.google.com/view/earn-paytm-cash/ https://www.jabcomix.com/cgi-bin/links/out.cgi?id=3dgspot&url=https://sites.google.com/view/earn-paytm-cash/ https://www.invisalign-doctor.com.au/api/redirect?url=https://sites.google.com/view/earn-paytm-cash/ http://www.webworksinternet.com/php/paulegan/guestbook/go.php?url=https://sites.google.com/view/earn-paytm-cash/ http://www.worldlingo.com/S4698.0/translation?wl_url=https://sites.google.com/view/earn-paytm-cash/ https://www.indice.com/redir.asp?pagina=https://sites.google.com/view/earn-paytm-cash/ https://www.tokyocreative.com/outbound?url=https://sites.google.com/view/earn-paytm-cash/ https://www.netwalkerstore.com/redirect.asp?accid=-18244&adcampaignid=2991&adcampaigntype=2&affduration=30&url=https://sites.google.com/view/earn-paytm-cash/ http://wfc2.wiredforchange.com/dia/track.jsp?v=2&c=hdorrh+HcDlQ+zUEnZU5qlfKZ1Cl53X6&url=https://sites.google.com/view/earn-paytm-cash/ https://www.finnflare.com/bitrix/rk.php?goto=https://sites.google.com/view/earn-paytm-cash/ http://www.masch.com/modules/ads/click.php?id=96&url=https://sites.google.com/view/earn-paytm-cash/ https://www.hottystop.com/cgi-bin/at3/out.cgi?id=62&trade=https://sites.google.com/view/earn-paytm-cash/ http://www.aidenpan.com/home/link.php?url=https://sites.google.com/view/earn-paytm-cash/ https://home.putclub.com/link.php?url=https://sites.google.com/view/earn-paytm-cash/ http://redir.speedbit.com/redir.asp?id=8030&urldirect=https://sites.google.com/view/earn-paytm-cash/ https://fis.com/fis/shared/redirect.asp?banner=6158&url=https://sites.google.com/view/earn-paytm-cash/ https://www.starnow.com/Link.aspx?l=4815&return_url=https://sites.google.com/view/earn-paytm-cash/ http://closings.cbs6albany.com/scripts/adredir.asp?url=https://sites.google.com/view/earn-paytm-cash/ https://www.best-aviation-jobs.com/en/search/track/?url=https://sites.google.com/view/earn-paytm-cash/ http://www.kompassdiamonds.com/WebKompassDiamonds/en/redirect?url=https://sites.google.com/view/earn-paytm-cash/
newsjen
2
0
0
C++ Assignment Help
chrisrogers6206
1
0
1
Book Recommendation: City of Brass Trilogy
caricakes
12
0
2
Install iOS 14, iPadOS 14 on Your iPhone And iPad Now
aidamartin
1
0
0
1Y0-204 orig. Prüfungsfragen, 1Y0-204 Unterlagen Software
exam24
1
0
0
Nakase Law Bulgin Settlement Valuation
blakeales44
1
0
0
Coding: How To Earn Money While You Pursue Coding?
vaibhavaryson
3
0
0
Learn SQL: Main Concepts and Principles
snehacynixit
0
0
0
Types and Applications of Bispecific Antibodies
ivanchen
1
1
0
6 Strategies to Get The Best Work From Your Students
stephenhawking
19
0
3
9 Signs You Have Senioritis
stephenhawking
9
0
0
World's First Blockchain Food Delivery App
allencalvy
6
0
0
Manga Books For Sell!😊📚
Yugykookie97
26
3
3
Social Media Marketing – For The Millions Watching you
vaibhavaryson
3
1
0
How MFS Works? Know its Functioning!
AdityaAndy
1
0
0
Thi thử TOEIC miễn phí online
vieclamgiasu123
1
0
0
독서의 달 맞이, 책 싫어하는 이가 방문해도 좋을 추천 감성 책방
eyesmag
41
55
3
All About MFS - Next Level Flight Simulator
AdityaAndy
1
0
0
4.7 Star App Store Review!
Cpl.dev***uke
The Communities are great you rarely see anyone get in to an argument :)
king***ing
Love Love LOVE
Download

Select Collections