String Functions :
The following scalar functions perform an operation on a string input value and return a string or numeric value.
Note: Below functions which are having * are frequently used.
len ('string value')
select len('palletechnologies') as 'op'
Query to display employees in descending numbers of the total number of characters present in the employees fullname.
-> select * from employees order by len(fname+lname) desc
Upper and Lower:
select upper(fname) as 'FNAME', upper(lname) as 'LNAME' from employees
select reverse 'palle' as 'revop'
Query for displaying employees fullname in uppercase reverse format
-> select upper(reverse) (fname+lname) as 'reverseupper fullname' from employees
replace(sourcestring, string to be replaced, replacing string)--->nvarchar
Query to replace a letter from a word
By using this function we can extract portion of a string fron a given string.
Query for showing the result of substring operation on a word
->select substring 'palletechnologies',3,5) as 'res'
used for removing left side and right side spaces respectively present in a given string.
Select ltrim( 'palle technologies') as 'res'
Query for displaying employee details whose fullname is having more than 10 characters.
->select * from employees where len(fname+lname>10)
Query for displaying employee details whose fullname is having more characters
->select top 1 * from employees order by len(fname+lname) desc