![]() ![]() Now we have to apply replace query to change the department part of the designation field. In the above table, we can see the department name is changed. Update emp set department='Marketing' where department='Sales' Before that let us change the department name to Marketing by using this simple update command. Now we will try to change the departments exists within the designation field. Here is the table before any changes are applied. It should only change part of the designation saying about the particular function ( or department ). But the problem is changing the designation of GM( Sales ) to GM ( Marketing), the query should change only for 'Sales' inside department field and should not change their main designation like GM, VP or Manager. ![]() We can give a single update command in the field department to change the department name to Marketing where ever it is Sales. Now let us say that the department name Sales changed to Marketing in the organization. ![]() There are different designation given based on the name of their department like GM( finance ), Manager (HR), VP(Sales) etc. In one employee table ( name emp ) we have three fields, name designation and department. Related Tutorial Update Query Adding string to record
0 Comments
Leave a Reply. |