Tag Archives: String Function

SQL REVERSE

SQL REVERSE function is used to return reverse of a string. It’s supported by MS SQL Server, MySQL. Oracle supports it too, but maybe not in the documents.

SQL Functions Also tagged , , Leave a comment

SQL LEFT Function

SQL LEFT() function is used to get left part of a string with the length of specified number. It is supported by MySQL, MS SQL Server, Access, but not by Oracle.

SQL Functions Also tagged , Leave a comment

SQL SPACE

SQL SPACE() function is used to return space characters, the number of the characters is indicated by the interger parameter. It is supported by MySQL and MS SQL Server, but not Oracle.

SQL Functions Also tagged , Leave a comment

SQL ASCII

SQL ASCII function is used to return ASCII code of a character, if the parameter is a string, it will return the ASCII code of the most left character.

SQL Functions Leave a comment

SQL TRIM

The SQL TRIM() function is used to remove the leading or trailing spaces of a string. Different databases have different writtings: SQL Server LTRIM(), RTRIM() Oracle LTRIM(), RTRIM() MySQL TRIM(), LTRIM(), RTRIM() In SQL Server or Oracle it doesn’t have Trim() function, we can combine LTrim() and RTrim(): RTRIM(LTRIM(str))

SQL Functions Leave a comment

SQL MID

The SQL MID() function is used to get part of a string. It’s supported by MySQL, but not by MS SQL Server or Oracle. In SQL Server, Oracle databse, we can use SQL SUBSTRING or SQL SUBSTR instead.

SQL Functions 1 Comment

SQL LENGTH, SQL LEN

SQL LENGTH or SQL LEN Function is used to get the length of a string. Different databases have different writtings: SQL Server LEN Oracle LENGTH MySQL LENGTH

SQL Functions Leave a comment

SQL Replace

The SQL Replace function is used to replace every occurrences of a specified string with a replacement string.

SQL Functions Leave a comment

SQL CONCAT, Concatenate Function

SQL CONCAT Function is used to Concatenate (combine) 2 or more strings. Different databases have different writtings: SQL Server + Oracle CONCAT(), || MySQL CONCAT()

SQL Functions Leave a comment

SQL SUBSTRING

SQL SUBSTRING function is used to get part of a string. Different databases have different writtings: SQL Server SUBSTRING() Oracle SUBSTR() MySQL SUBSTR(), SUBSTRING()

SQL Functions 5 Comments