Answers for "sql truncate string"

SQL
1

grab part of a string sql

SELECT 
    SUBSTRING('SQLTutorial.org',
        POSITION('.' IN 'SQLTutorial.org'));
Posted by: Guest on March-18-2020
0

grab part of a string sql

SELECT SUBSTRING('SQLTutorial.org');
Posted by: Guest on March-18-2020
1

sql truncate number

-- Truncate number with cast
UPDATE my_table
SET my_column = CAST(my_column AS INT)
WHERE ...;
-- or convert
UPDATE my_table
SET my_column = CONVERT(INT, my_column)
WHERE ...;
Posted by: Guest on May-10-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language