SQL Collation conflict when comparing to a column in a temp table

后端 未结 4 1108
遇见更好的自我
遇见更好的自我 2020-12-31 10:42

I have a SQL query that compares a value in the database to a constant:

SELECT * FROM my_table
INNER JOIN #TempTable tem
    ON my_table.id = temp.id
    AND         


        
4条回答
  •  说谎
    说谎 (楼主)
    2020-12-31 11:37

    try

    SELECT * FROM my_table
    INNER JOIN #TempTable temp    
        ON my_table.id = temp.id collate database_default
        AND my_table.key = 'SOME STRING'
    

提交回复
热议问题