I was trying few queries on SQL server, i just gave the below query and i was baffled with the result it gave.
Query : Select '1' + 1
Result = 2
I was expecting the sql server to throw an error while i try to add varchar 1 ('1') and the integer 1 (1), instead it added both the numbers and returned the result as 2.
Can anyone guide me on my the select query added those 2 numbers and why it did not throw an error.
The engine will always try to convert implicitly if nothing is said and depending on the data types.
You can see in this MSDN article (http://msdn.microsoft.com/en-us/library/ms191530.aspx) all implicit
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.