SQL: What is better a Bit or a char(1)

后端 未结 5 541
谎友^
谎友^ 2020-12-17 18:06

Is there any performance difference on retrieving a bit or a char(1) ?

Just for curiosity =]

UPDATE: Suposing i\'m using SQL Server 2008!

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 18:48

    use a bit. ALWAYS use the smallest possible datatype. it is critical once you start getting large tables.

提交回复
热议问题