SQL Server: Null VS Empty String

后端 未结 8 1924
青春惊慌失措
青春惊慌失措 2020-12-04 09:34

How are the NULL and Empty Varchar values stored in SQL Server. And in case I have no user entry for a string field on my UI<

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 10:20

    NULL is a non value, like undefined. '' is a empty string with 0 characters.
    The value of a string in database depends of your value in your UI, but generally, it's an empty string '' if you specify the parameter in your query or stored procedure.

提交回复
热议问题