Interview Answer

Nine people canít make a baby in a month. (regarding the addition of more programmers to get a project completed faster Fred Brooks

Update the data in the table

April 12, 2016 7:26 pm

Comments



Update the data in the table



												desc suppliers;
												
												Name           Null     Type         
												-------------- -------- ------------ 
												EMPLOYEE_ID    NOT NULL NUMBER(6)    
												FIRST_NAME              VARCHAR2(20) 
												LAST_NAME      NOT NULL VARCHAR2(25) 
												EMAIL          NOT NULL VARCHAR2(25) 
												PHONE_NUMBER            VARCHAR2(20) 
												HIRE_DATE      NOT NULL DATE         
												JOB_ID         NOT NULL VARCHAR2(10) 
												SALARY                  NUMBER(8,2)  
												COMMISSION_PCT          NUMBER(2,2)  
												MANAGER_ID              NUMBER(6)    
												DEPARTMENT_ID           NUMBER(4)  

												select the data for the employee 100

												select * from suppliers where employee_id = 100;


												100	Steven	King	SKING	515.123.4567	17-JUN-03	AD_PRES	24000			90
												

Update the employee with 100


Solution

   					 
												UPDATE suppliers
												SET first_name= 'sivaselvi',
												last_name='Ramasamy'
												WHERE employee_id = 100;
												commit;

												Now The following query returns the updated value 
												select * from suppliers where employee_id = 100;

												100	sivaselvi	Ramasamy	SKING	515.123.4567	17-JUN-03	AD_PRES	24000			90
																    

Comments



Please login to add comments.