Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insertion with condition query

 
rajesh mahendran
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic