От: | Senyai | http://www.arseniy.net | |
Дата: | 26.10.05 12:25 | ||
Оценка: |
SELECT * FROM TBL WHERE STAT&4=4
(STAT это tinyint) И вот я подумал, что, наверное, это не очень эффективно. Возможно, лучше сделать SELECT * FROM TBL WHERE BIT2=4
, где BIT2 имеет тип bit. И вроде быСпасибо за внимание.Microsoft® SQL Server™ optimizes the storage used for bit columns. If there are 8 or fewer bit columns in a table, the columns are stored as 1 byte. If there are from 9 through 16 bit columns, they are stored as 2 bytes, and so on.