As the title indicates: Is there a way to turn off implicit type conversion in SQL Server?
I want the following simple SQL to generate an error
SELECT 'a' WHERE 1='1'
There is no way to disable it.
It has been requested though: see the proposed SET OPTION STRICT ON
MS Connect request which comes from Erland Sommarskog
However, it is utterly predictable according to datatype precedence rules
Your example of a foreign key is interesting because an actual FOREIGN KEY constraint requires the same datatype, length and collation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With