-
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
-
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 :wave: