SQLMANUAL
SQLMANUAL
DNAME CHAR(10),
DMGR_ID INT
);
Table Created
DESC DEP;
Table created.
DESC EMP;
To Insert The values In EMP Table
SQL>INSERT INTO EMP VALUES (1001,'ANIL','CHOWDARY','MANAGER','01-JAN-2000', 25000, 1001, 2);
1 row created.
SQL Command To see the values that you inserted into a EMP table
Query 3: Write an SQL query to update the salary to 18,000 for the employee whose
EMP_ID is 1004.
SQL> UPDATE EMP SET SAL = 18000 WHERE EMP_ID = 1004;
To see the updated table after making changes (like updating a salary), use the
SELECT statement.
SQL>select * from EMP;
Query 4: Write an SQL query to display the employee id (EMP_ID) and salary (SAL) of
the employee whose EMP_ID is 1004.
Query 5: Write an SQL query to display the Employee ID, First Name, Last Name, and
Department Name of employees who are department managers.
SQL> SELECT EMP_ID, FNAME, LNAME, DNAME FROM EMP, DEP WHERE EMP_ID=DMGR_ID;
Query 6:Write an SQL query to Delete the record whose EMP_ID is 1003
Table created.
COMMAND To see the structure of a CUST table:
DESC CUST;
Table created.
DESC SALGRADE;
To Insert The values In SALGRADE Table
SQL Command To see the values that you inserted into a SALGRADE table