File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Query meaning...? why they are using null here ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Query meaning...? why they are using null here ..." Watch "Query meaning...? why they are using null here ..." New topic
Author

Query meaning...? why they are using null here ...

vinayak jog
Ranch Hand

Joined: Apr 01, 2011
Posts: 76

Simple query

select column_name, null from table_name;

what is the use of null here ?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4240
    
    7

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: Query meaning...? why they are using null here ...
 
Similar Threads
Getting 0 rows returned when selecting with null values
Java and database
Data table error
Concurrency Issue with HSQLDB
DB2 connectivity - strange error