I am trying to convert the Oracle script to SQL Server script. But it seems my MIN() function is not working as expected as it is being executed in Oracle.
For SQL Server :
SELECT MIN(v)
FROM (VALUES ('20013E17587A1_2'), ('20013E17587_2')) AS value(v);
Result: 20013E17587_2
However,
For ORACLE :
SELECT MIN(t.value)
FROM tab t;
Result: 20013E17587A1_2
I am getting this as a result. Can somebody explain why is this difference and what can be done to have same result?