Results 1 to 2 of 2

Thread: help in sql query

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    bkk
    Posts
    224

    help in sql query

    dear all,
    i need a query to update datas in a new filed. i have around 1000 records in a table. i need to include a code field in that table. my code starts from 1,2,3 and ends with 1000, is it possible to update the field (within a single update) with the query? how??. replies and help will be appreciated.
    thanks
    parthi

  2. #2
    New Member ahpaul's Avatar
    Join Date
    Dec 2002
    Posts
    12
    If you wants to update *ALL* records in the DB, don't specify any *WHERE* rules

    Code:
    UPDATE EMP SET EMPNAME = 'HI';
    Above line will update all record in the EMP table with 'HI' in the EMPNAME

    Code:
    UPDATE EMP SET EMPNAME = 'HI'
    WHERE EMPNO = '1234';
    Well it only updates the *ALL* the record that EMPNO is 1234

    Hope helps

Posting Permissions

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



Click Here to Expand Forum to Full Width