About 20,600 results
Open links in new tab
  1. SQL Server - BIT data type Issue - Stack Overflow

    Feb 29, 2016 · Using the Bit Data type. "The SQL Server Database Engine optimizes storage of bit columns. If there are 8 or less bit columns in a table, the columns are stored as 1 byte. If …

  2. sql - How can I use SUM for bit columns? - Stack Overflow

    Nov 26, 2015 · You can use CAST and CONVERT function for data type to integer or number data type. Try this code blocks : SELECT SUM(CAST(bitColumn AS INT)) as bitColumn …

  3. sql server - bit type : default to '0' instead of NULL - Stack Overflow

    May 16, 2017 · Unfortunately even this : ALTER TABLE mytable ADD CONSTRAINT No_Nulls DEFAULT 0 FOR myfield; will not work. SQL Server insists on assigning NULL to all boolean …

  4. Imply bit with constant 1 or 0 in SQL Server - Stack Overflow

    In this case statement (which is part of a select statement) ICourseBased is of type int. case when FC.CourseId is not null then 1 else 0 end as IsCoursedBased To get it to be a bit type I have …

  5. .net - C# Equivalent of SQL Server DataTypes - Stack Overflow

    There are updated versions of the table for SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 and SQL Server 2014. SQL Server Data Types and Their .NET Framework Equivalents …

  6. Applying the MIN aggregate function to a BIT field

    There is no reason why data type bit should be invalid for min/max, since obviously 0 < 1 and thus bit values are orderable. – Michael Commented May 7, 2021 at 16:52

  7. sql - Get MAX value of a BIT column - Stack Overflow

    I have a SELECT request with 'inner join' in the joined table is a column with bit type. I want to select 1 if in the joined table is at most one value with 1. If it is not the case the value will be 0. …

  8. What value could I insert into a bit type column?

    Apr 4, 2017 · Generally speaking, for boolean or bit data types, you would use 0 or 1 like so: UPDATE tbl SET bitCol = 1 WHERE bitCol = 0 See also: Which MySQL data type to use for …

  9. Is BIT field faster than int field in SQL Server?

    May 14, 2009 · As Sushruth said, bits will be grouped into bytes: The SQL Server Database Engine optimizes storage of bit columns. If there are 8 or fewer bit columns in a table, the …

  10. Why use "Y"/"N" instead of a bit field in Microsoft SQL Server?

    Nov 9, 2008 · The schema I referred to was in-fact deployed on Oracle and SQL Server. It limited the usage of data types to a common subset available on both platforms. They did diverge in a …

Refresh