473,387 Members | 1,619 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,387 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 4186

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: 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:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.