aspose file tools*
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 Spring in Action this week in the Spring 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: 4421
    
    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?