SQL Server Compact Edition ISNULL(sth, ' ') returns a boolean value?

后端 未结 1 1376
既然无缘
既然无缘 2020-12-20 17:20

I have an Accounts table with columns name, password and email. They are all type nvarchar. I wrote a query like

相关标签:
1条回答
  • 2020-12-20 18:11

    According this ISNULL is not implemented in SQL Server CE. I would expect to see a syntax error raised, however.

    Workaround: you can use CASE WHEN email IS NULL THEN 'eeee' ELSE email END or COALESCE. Preferably the latter.

    Also use parameterised queries. If you don't know why you should, learn.

    0 讨论(0)
提交回复
热议问题