mrinal212 | Oracle Database | System Software

Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Newhorizon>set oracle_sid=newhoriz C:\Documents and Settings\Newhorizon>sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 21 01:37:23 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter user-name: hr Enter password: Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> create table emp45(employee_id number(10), job_id varachar2(10), salary num ber(4,2)); create table emp45(employee_id number(10), job_id varachar2(10), salary number(4 ,2)) * ERROR at line 1: ORA-00907: missing right parenthesis SQL> ed Wrote file afiedt.buf 1* create table emp45(employee_id number(10), job_id varachar2(10), salary num ber(4,2)) SQL> / create table emp45(employee_id number(10), job_id varachar2(10), salary number(4 ,2)) * ERROR at line 1: ORA-00907: missing right parenthesis SQL> create table emp66 (employee_id number(10), job_id varchar2(10), salary num ber(6,4)); Table created. SQL> insert into emp66 (employee_id, job_id, salary) 2 values(114, hr, 10000); values(114, hr, 10000) * ERROR at line 2: ORA-00984: column not allowed here SQL> ed Wrote file afiedt.buf 1 insert into emp66 (employee_id, job_id, salary) 2* values(1, hr, 100) SQL> / values(1, hr, 100)

SQL> ed Wrote file afiedt." . . SQL> select * from emp88. job_id varchar2(20)) SQL> / create table emp88(department_id number(20). job_id varchar2(20)) * ERROR at line 1: ORA-00955: name is already used by an existing object SQL> insert into emp88 (department_id . job_id. 0 rows updated.. 10) * ERROR at line 2: ORA-00984: column not allowed here SQL> ed Wrote file afiedt. job_id. salary) 2* values(1.* ERROR at line 2: ORA-00984: column not allowed here SQL> ed Wrote file afiedt. salary) 2* values(1. job_id) 2 values (2. Table created.' hr'.buf 1 insert into emp66 (employee_id. SQL> 2 3 4 5 6 7 update emp88 set department_id = (select department_id from employees where employee_id = 100) where job_id = (select job_id from employees where employee_id = 200)..rest of line ignored. job_id varchar2(20)). hr. job_id) SP2-0734: unknown command beginning "inert into. 10) SQL> / 1 row created. hr.buf 1 insert into emp66 (employee_id. SQL> create table emp88(department_id number(20). SQL> inert into emp88(department_id.buf 1* create table emp88(department_id number(20). 'hr'). 10) SQL> / values(1. 1 row created.

'jsmith').buf 1 insert into( select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5* values (2. 'smith'.-------------------2 hr SQL> select job_id 2 from employees 3 where employee_id=200. 0 rows deleted. 'smith'. 'jsmith') SQL> / where department_id = 50 * ERROR at line 3: ORA-00904: "DEPARTMENT_ID": invalid identifier SQL> ed Wrote file afiedt. SQL> insert into select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5 values (2. insert into select employee_id * ERROR at line 1: ORA-00903: invalid table name SQL> ed Wrote file afiedt. 'jsmith') SQL> / where department_id = 50 * ERROR at line 3: ORA-00904: "DEPARTMENT_ID": invalid identifier . JOB_ID ---------AD_ASST SQL> 2 3 4 5 delete from emp88 where department_id = (select department_id from departments where department_name like '%public%').DEPARTMENT_ID JOB_ID ------------. 'smith'.buf 1 insert into( select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5* values (2.

buf 1 insert into( select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5* values (2.buf 1 insert into( select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5* values (2) SQL> / where department_id = 50 * ERROR at line 3: ORA-00904: "DEPARTMENT_ID": invalid identifier SQL> ed Wrote file afiedt. 'jsmith') SQL> / where department_id = 50 * ERROR at line 3: ORA-00904: "DEPARTMENT_ID": invalid identifier SQL> ed Wrote file afiedt.SQL> ed Wrote file afiedt.buf 1 2 3 4 5* SQL> from insert into( select employee_id from emp66 where employee_id = 50 with check option) values (2) / emp66 * ERROR at line 2: ORA-01402: view WITH CHECK OPTION where-clause violation .buf 1 insert into( select employee_id 2 from emp66 3 where department_id = 50 4 with check option) 5* values 2 SQL> / where department_id = 50 * ERROR at line 3: ORA-00904: "DEPARTMENT_ID": invalid identifier SQL> ed Wrote file afiedt. 'smith'.

---------hr 10 ht . EMPLOYEE_ID JOB_ID SALARY ----------.job_id from emp66 where employee_id=1 with check option) values (1.---------. 1 row created. EMPLOYEE_ID ----------1 1 SQL> JOB_ID SALARY ---------.SQL> select * 2 from emp66.'ht'). SQL> select * 2 from emp66.---------1 hr 10 SQL> 2 3 4 5 insert into(select employee_id.

Sign up to vote on this title
UsefulNot useful