0

What is the datatype of '' in sql server and does performance hit when concatenating nvarchar, varchar, and ''.

What are the implicit conversions here?

juergen d
  • 201,996
  • 37
  • 293
  • 362
blogbydev
  • 1,445
  • 2
  • 17
  • 29
  • The exact datatype depends on whether or not the string literal has the `N` prefix and the length of the string. Concatenating a string without the `N` prefix that is between 4K and 8K characters long to an nvarchar will [always cause truncation](http://stackoverflow.com/questions/12639948/sql-nvarchar-and-varchar-limits/12639972#12639972) as it gets cast to `nvarchar(4000)` – Martin Smith Nov 14 '13 at 10:48

1 Answers1

2

It is varchar. Use

select sql_variant_property('','BaseType')
juergen d
  • 201,996
  • 37
  • 293
  • 362