Basic SQL Commands
List name of companies located in BOMBAY.
SQL>select cname from company where city =`BOMBAY';
list name of employees living in city `NAGPUR'
SQL>select ename from employees where city = `Nagpur';
List the names of employee who are not employee with the company 'ACC'.
SQL>select ename from emp_company where not (cname='ACC');
-OR-
SQL>select ename from emp_company where cname<>'ACC';
Suppose you want the names of employee from company 'ACC' or 'TATA'
SQL>select ename from emp_company where cname='ACC' or cname='TATA';
LAB:-
Create your own commands to find out the required data
No comments:
Post a Comment