My question in kind of replace with key in SQL Server. Can anyone give me a query to do this?
Thanks for your answers!
Table1:
ID | Code | Des | more columns
---+------+-----+-------------
1 | 100 | a | ...
2 | 200 | b | ...
3 | 300 |data3| ...
Table2:
ID | Code | Des
---+------+------
1 | 100 | data1
2 | 200 | data2
The result must be this:
ID | Code | Des | more columns
---+------+-----+-------------
1 | 100 |data1| ...
2 | 200 |data2| ...
3 | 300 |data3| ...
inner join.