Skip to main content

Posts

Showing posts from August, 2009

Database Knowledge for a Tester Part IV

1 COMPUTATIONS ON TABLE DATA Computations on table data may include displaying an employee’s name and the employee salary from the EMPLOYEE Master table alongwith the annual salary of the employee (i.e. Salary * 12). This can be achieved by using Arithmetic operator. We will see all these explained in below mentioned sections. 1.1 Operators Usage 1.1.1 Arithmetic Operator Oracle allows arithmetic operators to be used while viewing records from the table or while performing Data Manipulation operations such as Insert, Update and Delete. For e.g. Consider we want to increment the salary of all employees by Rs 500. UPDATE EMPLOYEE SET SALARY = (SALARY + 500) Similarly you can use the above arithmetic operator for manipulating other data based on the requirement. 1.1.2 Logical Operator The AND operator The AND operator requires that each condition must be met for the record to be included in the result set. It can be used in any valid SQL statement such as Select, Ins