Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server 6.5 Datetime nulls
Message
From
17/04/1998 13:51:03
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
 
 
To
17/04/1998 12:22:04
Greg Johnston
Cook Systems International, Inc.
Little Rock, Arkansas, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00092917
Message ID:
00092960
Views:
20
>Can SQL Server 6.5 have an actual null value for a datetime column or will it always default to Jan. 1, 1900, 12:00:00?

According to the MS Transact-SQL Reference (pg 242) the answer is yes. The book says the datetime datatype is internally converted to datatype datetimn (whatever that means).

Since I had SQL Enterprise up and running, I ran a quick test. I created a table with a single field of type datetime and set it to allow nulls. I then did a null insert (INSERT test VALUES (NULL)) which resulted in a field value of (null) when I did a select on the table.

Hope that helps.
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Previous
Reply
Map
View

Click here to load this message in the networking platform