sql string functions

ASCII Returns the equivalent ASCII value for a specific character.
CHAR_LENGTH Returns the character length of a string.
CHARACTER_
LENGTH Same as CHAR_LENGTH.
CONCAT Adds expressions together, with a minimum of 2.
CONCAT_WS Adds expressions together, but with a separator between each value.
FIELD Returns an index value relative to the position of a value within a list of
values.
FIND IN SET Returns the position of a string in a list of strings.
FORMAT When passed a number, returns that number formatted to include
commas (eg 3,400,000).
INSERT Allows you to insert one string into another at a certain point, for a
certain number of characters.
INSTR Returns the position of the first time one string appears within another.
LCASE Convert a string to lowercase.
LEFT Starting from the left, extract the given number of characters from a
string and return them as another.
LENGTH Returns the length of a string, but in bytes.
LOCATE Returns the first occurrence of one string within another,
LOWER Same as LCASE.
LPAD Left pads one string with another, to a specific length.
LTRIM Remove any leading spaces from the given string.
MID Extracts one string from another, starting from any position.
POSITION Returns the position of the first time one substring appears within
another.
REPEAT Allows you to repeat a string
REPLACE Allows you to replace any instances of a substring within a string, with
a new substring.
REVERSE Reverses the string.
RIGHT Starting from the right, extract the given number of characters from a
string and return them as another.
RPAD Right pads one string with another, to a specific length.
RTRIM Removes any trailing spaces from the given string.
SPACE Returns a string full of spaces equal to the amount you pass it.
STRCMP Compares 2 strings for differences
SUBSTR Extracts one substring from another, starting from any position.
SUBSTRING Same as SUBSTR
SUBSTRING_
INDEX
Returns a substring from a string before the passed substring is found
the number of times equals to the passed number.
TRIM Removes trailing and leading spaces from the given string. Same as if
you were to run LTRIM and RTRIM together.
UCASE Convert a string to uppercase.
UPPER Same as UCASE

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
how to get string value in sql get value from string sql sql string fucntions string function in sql server sql server string functions with examples of string in sql sql value.string_value all sql string functions sql function string string functions sql sql String Operations example get string value from string in sql get value from string in sql ' in sql string value sql server string function sql server string operations define string sql string function sql server built in function strings example sql sql conenction string strings sql strings in sql sql get value from string sql string functinos what is a string in sql make string functions in sql str function in sql string() sql string function sql how to use a string in sql string functions in sql server string value sql write the SQL query to perform the string functions sql value in string sql strings SQL string methods sql function to work with strings sql string example string function in sql string functions sql server T-SQL string functions sql varchar to int cast as int sql WHEN INT sql joun string SQL truncate string string iperations in sql cast counter as nvarchar sql cast as int convert to double sql sql cats int convert string to sql text sql cast int example how to cast value in sql sql convert text to integer nvarchar convert to int in sql cast var char to in in sql how to cast datatype sql. nrql string functions cast method in sql sql as number cast sql text manipulation where function string sql sql type casting string sql string in sql server cast as string in sql string in sql statement string sql select sql as number cast decimal to int sql string functions in sql server with examples AS [text()] in numeric in t-sql sql server string to int sql string functions sql server convert bigignt to string SQL server cast as varchar sql data cast sql string manipulation how to handle int in sql cast to text in sql server query how to integer in sql function word in sql sql string cast string as string operation in sql change sql data type long to string sql data type change long to string cast varchar to int in sql convert data type in sql VARCHAR TO NUMBER cast string to int in sql cast decimal in sql sql cast int to nvarchar how to cast decimal to varchar in sql server sql conert to number create index cast type to float sql cast index to float sql sql cast value to numeric type how to cast to numeric in sql how to cast date in sql convert to integer in sql NUMBER TO TEXT SQL sql cast bigint to double SQLSERVER QUERY CAST AS INT SQL Text to char cast to int sql string functions in sql sql change text to INT convert long to int sql type cast sql int and varchar in sql convert int to nvarchar in sql convert string to number sql cast sql as date cast substring to int sql sql server cast in ordeby sql server convert string to int converting sql string to sqlQuery cast as datetime in sql server cast tsql date sql convert string to long cast to float sql cast to float ssql sql convert string to number cast varchar as int cast varchar to int how to convert input from char to number in sql casgt sql string sql cast varchar to integer cast examples in sql cast as bit in sql sql string to float sql convert number to string how to cast float to int in sql sql convert string to float select integer sql cast date in sql cast to nvarchar sql sql server string functions casting as double in sql cast date select cast(-1 as datetime) change char to numeric sql astype sql sql decimal to string to sql cast with variable cast float sql server string in sql string to number sql convert string to number sql date casting in sql cast cast when sql cast from varchar to int sql sql cast as cast as varchar cast mid function to int sql cast varchar to int explain string operation in sql cast bigint sql string to varchar sql get int value from varchar sql sql server convert to integer toInteger sql sql cast int to char sql type cast sql convert string to int cast options sql convert to nvarchar in sql convert char to a number in sql convert function from text to int in sql string to number sql server value as string sql sql cast char() cast date sql cast as date in sql server convert to integer sql how to cast in sql sql cast data as int convert int to float sql server sql cast number as int32 convert number into % in sql sql server cast string to int SELECT casSpecial AS [text()] to as int select as [int] cast to decimal sql cast numeric to varchar sqlserver casting on date in sql sql type casts cast as nvarchar sql sql cast date cast to datetime sql convert decimal to int in sql convert string to int in sql expression parse int sql typecast variable sql .Select cast to int cast to int how to get int from char in sql sql how to cast to int sql castsql operators cast sql server function change from integer to float sql sql server cast() string operations in sql cast in sql for string to long sql long.tostring like get number from select sql server cast sql cast to float length valid function sql typecast in sql sql query for strings cast decimal sql cast sql varchar to int cast sql to string cast in sql w3schools cast varchar cast varchar to float in sql sql cast as int convert to int sql string functions in sql with examples sql server cast as date cast as int sql convert string to int in sql convert sql varchar to long what is supported in sql when dealing with strings sql string to int how can I cast real to string sql cast as string sql cast char as int sql CAST string how to cast as varchar in sql sql to string sql integer cast sql convert string to decimal cast AS FLOAT in sql server string manipulation in sql sql TEXT functions in sql cast in sql query convert string to int sql mssql cast sql convert int to int32 sql cast float cast in sql cast integer sql to string sql cast sql cast sql server -2.2170866031956393E-8 cast to int cast as string cast as date in sql cast to int mssql sql cast function sql convert decimal to int cast in sql server sql to text sql value of string
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source