Results 1 to 4 of 4
  1. #1
    anki1234 is offline Member
    Join Date
    Dec 2007
    Posts
    28
    Rep Power
    0

    Lightbulb Query in database

    Can I put an insert query with where like :
    insert into addcart (Status)values('N')where ProductName='laptop'
    Status & ProductName are columns in my table.
    Thanks in Advance
    Ankit

  2. #2
    yosefabd is offline Member
    Join Date
    Feb 2008
    Posts
    3
    Rep Power
    0

    Default

    no,no dear
    if the record previously found and you want to fill or update some fields ,you have to use update statement like :
    update addcart set status='N' where productName='laptop';

  3. #3
    herfnai is offline Member
    Join Date
    Aug 2008
    Posts
    13
    Rep Power
    0

    Default

    this insert mean update
    update addcart set status='N' where productName='laptop';

  4. #4
    herfnai is offline Member
    Join Date
    Aug 2008
    Posts
    13
    Rep Power
    0

    Cool

    this insert mean update
    update addcart set status='N' where productName='laptop';

Similar Threads

  1. Help in Query
    By geeta_ravikanti in forum JDBC
    Replies: 0
    Last Post: 03-31-2008, 01:16 PM
  2. Using sql:query tag
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-15-2008, 03:13 PM
  3. Using sql:query tag
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-14-2008, 09:31 AM
  4. How to query data from database using SSL
    By mano in forum New To Java
    Replies: 0
    Last Post: 08-02-2007, 05:30 PM
  5. Displaying different columns with database query
    By jennybgh in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-02-2007, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •