SQL Function Reference: Oracle vs. SQL Server

Try an online SQL class for free!



*same for both databases
Math Functions
Function Oracle SQL Server
Absolute valueABSABS
Arc cosineACOSACOS
Arc sineASINASIN
Arc tangent of nATANATAN
Arc tangent of n and mATAN2ATN2
Smallest integer >= valueCEILCEILING
CosineCOSCOS
Hyperbolic cosineCOSHCOT
Exponential valueEXPEXP
Round down to nearest integerFLOORFLOOR
Natural logarithmLNLOG
Logarithm, any baseLOG(N)N/A
Logarithm, base 10LOG(10)LOG10
Modulus (remainder)MODUSE MODULO (%) OPERATOR
PowerPOWERPOWER
Random numberN/ARAND
RoundROUNDROUND
Sign of numberSIGNSIGN
SineSINSIN
Hyperbolic sineSINHN/A
Square rootSQRTSQRT
TangentTANTAN
Hyperbolic tangentTANHN/A
TruncateTRUNCN/A
Highest number in listGREATESTN/A
Lowest number in listLEASTN/A
Convert number if NULLNVLISNULL
Standard deviation STDDEV STDEV
Variance VARIANCE VAR
String Functions
Function Oracle SQL Server
Convert character to ASCIIASCIIASCII
String concatenateCONCAT(expression + expression)
Convert ASCII to characterCHRCHAR
Return starting point of character in character string (from left)INSTRCHARINDEX
Convert characters to lowercaseLOWERLOWER
Convert characters to uppercaseUPPERUPPER
Pad left side of character stringLPADN/A
Remove leading blank spacesLTRIMLTRIM
Remove trailing blank spacesRTRIMRTRIM
Starting point of pattern in character stringINSTRPATINDEX
Repeat character string multiple timesRPADREPLICATE
Phonetic representation of character stringSOUNDEXSOUNDEX
String of repeated spacesRPADSPACE
Character data converted from numeric dataTO_CHARSTR
SubstringSUBSTRSUBSTRING
Replace charactersREPLACESTUFF
Capitalize first letter of each word in stringINITCAPN/A
Translate character stringTRANSLATEN/A
Length of character stringLENGTHDATALENGTH or LEN
Greatest character string in listGREATESTN/A
Least character string in listLEASTN/A
Convert string if NULLNVLISNULL
Date Functions
Function Oracle SQL Server
Date addition (use +) DATEADD
Date subtraction (use -) DATEDIFF
Last day of month LAST_DAY N/A
Time zone conversion NEW_TIME N/A
First weekday after date NEXT_DAY N/A
Convert date to string TO_CHAR DATENAME
Convert date to number TO_NUMBER(TO_CHAR()) DATEPART
Convert string to date TO_DATE CAST
Get current date and time SYSDATE GETDATE()

SQL Resources

SQL Training

SQL Training
SQL Server Training
Oracle Training
MySQL Training
Microsoft Access Training
Crystal Reports Training

SQL Tutorials

1Keydata.com SQL Tutorial
Interactive SQL Tutorial
SQLCourse.com SQL Tutorial
SQLCourse.com Advanced SQL Tutorial
W3Schools SQL Tutorial
SQL-Tutorial.net's SQL Tutorial
Oracle SQL Tutorial
SQL Tutorial
SQL Tutorial by Intermedia
PHP Tutorial

Other SQL References

Oracle 9i SQL Reference
MySQL 5.1 Reference
Microsoft's SQL Server Reference

Other SQL Sites

PostgreSQL Open Source Database

Other Sites

Online Perl Training
Do you have a SQL resource site? Please email sql @ webucator.com.

Copyright 2014 Webucator. All rights reserved.
Try an online SQL class for free!