wood burning stoves 2.0*
The moose likes JDBC and the fly likes insertion with condition query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "insertion with condition query" Watch "insertion with condition query" New topic
Author

insertion with condition query

rajesh mahendran
Greenhorn

Joined: Feb 17, 2013
Posts: 9
I fetched both the values total and reg and i need to know that how to insert a query with checking it with the condition



anyone help thanks in advance
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I don't think that's valid SQL. The bad part is, I don't even understand what you want to do with it. Perhaps you could start by explaining that. For example: what's "regno"? A database column? A Java variable?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

Paul Clapham wrote:I don't think that's valid SQL. ...


True. A where statement only works (and only makes sense) on existing rows. And insert is used to add a new row. The two contradict each other.


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insertion with condition query
 
Similar Threads
Reg Hashcodes
Reg Hashcodes
SQL formatting question
Reg : program
jsp polling