SQL commands
SQL commands
1. Display the salary of all the employees after incrementing by Rs. 1000
Ans: Select Salary+1000 from Emp;
2. Display the Employee id and slary of all the employees after decreasing by Rs.500
Ans: Select Emp_id, Salary-500 from Emp;
3. Display the Name and Salary of all the employees after incrementing it as thrice the
amount of present salary.
Ans: Select Ename, Salary*3 from Emp;
4. Display the Employee id, name, salary of all the employees after decrementing it as
half the amount of present salary
Ans:Select Emp_id, Ename, salary/2 from Emp;
5. Display the Employee id and name of all the employees
Ans:Select emp_id, ename from emp;
3. To delete a record
4. To display record
Ans :
1. Insert
2. Update
3. Delete
4. Select
Q21. Identify any two Column name/Attr ibute a nd their data types from a given table:
PLAYER. [C.B.S.E.]
PIO Char
PNAME VARCHAR
Q22. Consider the following table: EMPLOYEE [C.B.S.E.]
4. Display product name and sales price after deducting the discount from
the price. Note:Sales price can be calculated as (price-discount)
Ans : Select prod_name, price-Discount as Price from Sales;
Consider the following table: Teachers