aspose file tools*
The moose likes JDBC and the fly likes NULL value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "NULL value" Watch "NULL value" New topic
Author

NULL value

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Hi,

I was wondering how to insert a NULL value into a Database?

I did this,insert into tablename values('NULL'); and thought that it was correct until my friend showed me a table which had blank space. How did he have a table with a blank space?

Is null(unknown) value represented as a blankspace in a table or as NULL or as null?

Thanks.


Be Humble... Be Nice.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

'NULL' is inserting the String NULL
null will insert a null value
'' will insert an empty String

eg
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Thanks David.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NULL value