Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Converti una stringa in int usando la query sql

Puoi usare CAST o CONVERT :

SELECT CAST(MyVarcharCol AS INT) FROM Table

SELECT CONVERT(INT, MyVarcharCol) FROM Table