wood burning stoves 2.0*
The moose likes JDBC and the fly likes What's the significance of having null as a column ouput all nulls in SQL? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What Watch "What New topic
Author

What's the significance of having null as a column ouput all nulls in SQL?

vinayak jog
Ranch Hand

Joined: Apr 01, 2011
Posts: 81

Simple query

select column_name, null from table_name;

what is the use of null here ?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4344
    
    8

It's going to put a column in the output containing all nulls.

Pretty pointless by itself, but there may be cases where it's useful in conjunction with some other constructions. For example:
INSERT INTO ....
SELECT column_name, null
...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's the significance of having null as a column ouput all nulls in SQL?
 
Similar Threads
object reference variables as literals?
What value does readLine() return when it has reached the end of a file
WA #1.....word association
To Bert Bates and other authors too - please consider this request