1. Str() Function :
In MS Access, the Str() function return a number in the string format. In this function, we can pass any number the function will return that in the string format.
Syntax :
Str(number)
Example –
SELECT Str(100) AS ConvertToString;
Output –
| ConvertToString |
|---|
| 100 |
Example –
SELECT Str(421) AS ConvertToString;
Output –
| ConvertToString |
|---|
| 421 |
2. StrComp() Function :
In MS Access, The StrComp() function compare two strings . It will take two parameter string1, string2 as the parameter. If both strings will be same then it will return 0, and if the first string is greater than second then it will return 1 if string1<string2 then it returns -1 and if string1 or string2 is null then it will return null.
Syntax :
StrComp(string1, string2)
Example –
SELECT StrComp("geeksforgeeks", "gfg") AS CompString;
Output –
| CompString |
|---|
| -1 |
Example –
SELECT StrComp("gfg", "geeksforgeeks") AS CompString;
Output :
| CompString |
|---|
| 1 |
Recommended Posts:
- STR() Function in SQL Server
- Hex() and Oct() Function Function in MS Access
- SLN() and SYD() Function Function in MS Access
- DDB () and FV() Function Function in MS Access
- Val() and Sum() Function in MS Access
- Sgn() and Sqr() function in MS Access
- StrConv() and StrReverse() Function in MS Access
- Chr() and Asc() Function in MS Access
- InStr() and InstrRev() Function in MS Access
- LCase() and UCase () Function in MS Access
- Replace() and Space() Function in MS Access
- Exp() and Count() Function in MS Access
- Mid() and Len() Function in MS Access
- LTrim() and RTrim() Function in MS Access
- Left() and Right() Function in MS Access
- Rnd() and Round Function in MS Access
- Max() and Min() function in MS Access
- Fix() and Format() Function in MS Access
- Second() and Time() Function in MS Access
- MonthName() and Now() function in MS Access
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

