Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jehugaleahsa@gmail.com

    Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

    Does SQL Server 2005 Allows NULL for DateTime? Just checking.
  • jehugaleahsa@gmail.com

    #2
    Re: Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

    On Feb 26, 8:38 am, "jehugalea...@g mail.com" <jehugalea...@g mail.com>
    wrote:
    Does SQL Server 2005 Allows NULL for DateTime? Just checking.
    Thanks.

    Comment

    • Cowboy \(Gregory A. Beamer\)

      #3
      Re: Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

      If the database table is set up that way? Yes.

      --
      Gregory A. Beamer
      MVP, MCP: +I, SE, SD, DBA

      *************** *************** *************** ****
      | Think outside the box!
      |
      *************** *************** *************** ****
      <jehugaleahsa@g mail.comwrote in message
      news:812e27f9-5696-48a1-95e3-72e8beddf9ce@z1 7g2000hsg.googl egroups.com...
      Does SQL Server 2005 Allows NULL for DateTime? Just checking.

      Comment

      • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

        #4
        Re: Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

        jehugaleahsa@gm ail.com wrote:
        Does SQL Server 2005 Allows NULL for DateTime? Just checking.
        I am pretty sure that all relational databases by definition has to
        support NULL for all data types.

        Arne

        Comment

        • Paul E Collins

          #5
          Re: Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

          "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote:
          Well, so long as you're not using .NET 1.1 there's the fairly obvious
          choice of Nullable<DateTi me(aka "DateTime?" ).
          SqlDateTime is a bit safer because its MinValue and MaxValue match those
          of SQL Server.

          Eq.


          Comment

          • Paul E Collins

            #6
            Re: Simple Question - Does SQL Server 2005 Allows NULL for DateTime?

            "Jon Skeet [C# MVP]" <skeet@pobox.co mwrote:
            I also tend to avoid using MinValue and MaxValue in the first place,
            as they're rarely useful values.
            Yes, I suppose I only ever used MinValue as a "no date" flag before C#
            had nullable structs.

            Eq.


            Comment

            Working...