sql joun string code example
Example 1: sql convert float to string
SELECT STR(float_field, 25, 5)
Example 2: sql value of string
-- Specifically for Oracle
-- EXAMPLE
CAST('732.98' AS INT)
/* SYNTAX
CAST(<value_to_cast> AS <data_type_to_cast_to>)
*/
Example 3: concatenation in sql
We use "||" to concatenation in Sql
example:
WHERE LOWER(FIRST_NAME || LAST_NAME) LIKE '%d%' ;
Example 4: concat two columns in sql server
select Convert(nvarchar(50),ID)+'-'+Convert(nvarchar(50),Year) as ID_Year from tablename