PDA

Click to See Complete Forum and Search --> : help in sql query


parthi_75
Feb 21st, 2004, 04:02 AM
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

ahpaul
Feb 21st, 2004, 01:51 PM
If you wants to update *ALL* records in the DB, don't specify any *WHERE* rules


UPDATE EMP SET EMPNAME = 'HI';


Above line will update all record in the EMP table with 'HI' in the EMPNAME


UPDATE EMP SET EMPNAME = 'HI'
WHERE EMPNO = '1234';


Well it only updates the *ALL* the record that EMPNO is 1234

Hope helps :wave: