473,382 Members | 1,362 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.

Default value on Date column

Using MySQL control center, I created a MySQL database table with a
column of Date type. It always give the a Default value (0000-00-00)
even null is allowed. I tried remove the default value and it comes
back by itself.

So if I don't supply a value when insert, the default is used. Query
IS NOT NULL will not exclude this record.

Now, In VB (with ADO/MyOLEDB), I did the exact query trying to filter
out the null record. But I still get the record just like in Control
Center. BUT, the value on this column is "NULL".

How can I leave the Date field as null if no value is supplied?
Jul 19 '05 #1
0 4183

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

Similar topics

0
by: Q. John Chen | last post by:
Using MySQL control center, I created a MySQL database table with a column of Date type. It always give the a Default value (0000-00-00) even null is allowed. I tried remove the default value and...
1
by: Programmer | last post by:
Hi All Here is my problem I'm using a SQLDataAdapter and DataSet I use the method FillSchema(myDataset, SchemaType.Source) The problem is that when i Check the default Values of the Dataset...
2
by: Rob | last post by:
Hello all I have a field (called active) of type DATE and I want to add a default value. The default value must be the current date. Is this possible to do this in the table create statement? ...
1
by: garyusenet | last post by:
Using VB Express and SQL. I have an sql database. what function gives me todays date and time? and do i enter it in the 'default' property for the column in the database? i've tried now()...
12
by: Emi Lu | last post by:
Hello all, I have a question about "date" & "timestamp" types in PostgreSQL. I want to setup the default value '0000-00-00' and "0000-00-00 00:00:00" for them. However, it seems that PostgreSQL...
1
by: Peter Neumaier | last post by:
Hi! I'm wondering whether it's possible to set up the MS SQL function ISNULL() as a default value to avoid NULL entries when importing data into a table?! For example, I want the column1, to...
3
by: zufie | last post by:
I want to use SQL code to Create a Table & Provide a Default Value for Each Column. Here is the code I am using: CREATE TABLE customer (First_Name char(50), Last_Name char(50), Address...
4
by: BD | last post by:
Hi, all.. I'm creating a table with one column of type DATE, non nullable, with a default of the current date. The column syntax I'm using is "THIS_DATE_1 DATE NOT NULL DEFAULT CURRENT...
1
by: Mark Baldwin | last post by:
Steven Thanks for your reply, however the typed datasets are defined in the web service and there seems to way to open the partial class code window - double clicking on the design surface does...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.