473,382 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Feb 26 '08 #1
5 1164
On Feb 26, 8:38*am, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
Does SQL Server 2005 Allows NULL for DateTime? Just checking.
Thanks.
Feb 26 '08 #2
If the database table is set up that way? Yes.

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

*************************************************
| Think outside the box!
|
*************************************************
<je**********@gmail.comwrote in message
news:81**********************************@z17g2000 hsg.googlegroups.com...
Does SQL Server 2005 Allows NULL for DateTime? Just checking.

Feb 26 '08 #3
je**********@gmail.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
Feb 27 '08 #4
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote:
Well, so long as you're not using .NET 1.1 there's the fairly obvious
choice of Nullable<DateTime(aka "DateTime?").
SqlDateTime is a bit safer because its MinValue and MaxValue match those
of SQL Server.

Eq.
Feb 27 '08 #5
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote:
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.
Feb 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
3
by: AstrA | last post by:
Hi All Wondered if you could help. Basically I have 2 tables that contain all the data I want for my report, but I need to put it in a particular way and I need to display it in an ASP page...
5
by: Ryan | last post by:
I have some software (written in Delphi 5) which has been working for several months without a problem. I have been given a copy of the database on our development server (SQL 7) and have...
5
by: hishamfangs | last post by:
Hi guys! I'm facing a problem and I can't quite figure it out! I have created a table on SQL Server 2000 to store call records. We get about 250,000 calls a day, and the most frequently used...
6
by: Greg Collins [MVP] | last post by:
For background, please refer to my original thread: http://groups.google.com/groups?selm=efe5w7tYEHA.3112%40tk2msftngp13.phx.gbl I've thought of a potential way around the issue, but I'm new to...
6
by: Ted | last post by:
Here is one such function: CREATE FUNCTION my_max_market_date () RETURNS datetime BEGIN DECLARE @mmmd AS datetime; SELECT max(h_market_date) INTO @mmmd FROM holdings_tmp; RETURN @mmmd; END ...
1
by: mrkselm | last post by:
Hi, I am stuck with a problem in MS Access which does not occur in SQL Server and I have been banging my head against the wall for a couple of days now trying to resolve it. Namely, when I...
1
by: Ruth413 | last post by:
Hello - I am getting the these errors in my sql 2005 generated script. I am stuck with first error. Please help.... Msg 102, Level 15, State 1, Line 3 Incorrect syntax near '('. Msg 319,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.