Use of RIGHT Function in SQL

Use of RIGHT Function in SQL: (1) “Right” function is used to get a number of characters from a string that’s starting from right. (2) Let’s take an example to get a character from the Vendor Name as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. …

Use of LEFT Function in SQL

Use of LEFT Function in SQL: (1) “LEFT” function is used to get a number of characters from a string that’s starting from left. (2) Let’s take an example to get a character from the Vendor Name as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. …

Use of LEN Function in SQL

Use of LEN Function in SQL: (1) “LEN” function is used to calculate the length of the string. (2) Let’s take an example to calculate the length of “The Universe” as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. (4) After that new query editor opens …

Use of DATALENGTH Function in SQL

Use of DATALENGTH Function in SQL: (1) “DATALENGTH” function is used to calculate the length of the string. (2) Let’s take an example to calculate the length of the “Name” field in Vendor Table as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. (4) After that …

Use of CONCAT_WS Function in SQL

Use of CONCAT_WS Function in SQL: (1) “CONCAT_WS” function is used to concatenate more than two strings with specific values. (2) Let’s take an example to Add four strings with value “space” ‘ERP Consultors’, ‘Provide’, ‘Best’, ‘Service’ as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. …

Use of CONCAT Function in SQL

Use of CONCAT Function in SQL: (1) “CONCAT” function is used to add two or more strings together. (2) Let’s take an example to Add Vendor No. and Vendor Name field in one string in Vendor table as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. …

Use of CHARINDEX Function in SQL

Use of CHARINDEX Function in SQL: (1) “CHARINDEX” function is used to get the position of Character from a string. (2) Let’s take an example to get the position of ‘e’ from the Vendor Address field in the Vendor table as shown. Note: (i) This function performs a case-insensitive search and (ii) Gives first find position …

Use of CHAR function in SQL

Use of CHAR function in SQL: (1) “CHAR” function is used to get the first CHARACTER from ASCII Value. (2) Let’s take an example to get CHAR from the ASCII Value field from the Vendor table as shown. (3) Select the database in the SQL server and click on the “New Query” button as shown. (4) …