0% found this document useful (0 votes)
8 views2 pages

Ex 4

A table named 'emp' was created with columns for employee number, name, and salary. Five employee records were inserted into the table, followed by an additional record for 'Robert White' without a salary. The final selection of the table shows a total of six employee entries.

Uploaded by

Suwathi V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Ex 4

A table named 'emp' was created with columns for employee number, name, and salary. Five employee records were inserted into the table, followed by an additional record for 'Robert White' without a salary. The final selection of the table shows a total of six employee entries.

Uploaded by

Suwathi V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL> Create table emp(eno number(4),ename varchar2(15),salary number(6));

Table created.

SQL> Insert into emp values(&1,'&2',&3);


Enter value for 1: 1001
Enter value for 2: Employee1
Enter value for 3: 14000
old 1: Insert into emp values(&1,'&2',&3)
new 1: Insert into emp values(1001,'Employee1',14000)

1 row created.

SQL> /
Enter value for 1: 1002
Enter value for 2: Employee2
Enter value for 3: 6000
old 1: Insert into emp values(&1,'&2',&3)
new 1: Insert into emp values(1002,'Employee2',6000)

1 row created.

SQL> /
Enter value for 1: 1003
Enter value for 2: Employee3
Enter value for 3: 8000
old 1: Insert into emp values(&1,'&2',&3)
new 1: Insert into emp values(1003,'Employee3',8000)

1 row created.

SQL> /
Enter value for 1: 1004
Enter value for 2: Employee4
Enter value for 3: 7000
old 1: Insert into emp values(&1,'&2',&3)
new 1: Insert into emp values(1004,'Employee4',7000)

1 row created.

SQL> /
Enter value for 1: 1005
Enter value for 2: Employee5
Enter value for 3: 9000
old 1: Insert into emp values(&1,'&2',&3)
new 1: Insert into emp values(1005,'Employee5',9000)

1 row created.

SQL> Select * from emp;

ENO ENAME SALARY


---------- --------------- ----------
1001 Employee1 14000
1002 Employee2 6000
1003 Employee3 8000
1004 Employee4 7000
1005 Employee5 9000
SQL> Insert into emp(eno,ename)values(4,'Robert White');

1 row created.

SQL> Select * from emp:


2
SQL> select * from emp;

ENO ENAME SALARY


---------- --------------- ----------
1001 Employee1 14000
1002 Employee2 6000
1003 Employee3 8000
1004 Employee4 7000
1005 Employee5 9000
4 Robert White

6 rows selected.

SQL> spool off

You might also like