jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes insertion with condition query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
Sheriff

Joined: Oct 14, 2005
Posts: 19739
    
  10

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: 2549
    
  10

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insertion with condition query
 
It's not a secret anymore!