You are on page 1of 5

SQL> rollback r1; rollback r1 * ERROR at line 1: ORA-02181: invalid option to ROLLBACK WORK SQL> SQL> create

table func(roll number(10),name varchar2(10),mark number(10)); Table created. SQL> insert into function values(&id,'&name','&mark') 2 insert into function values(&id,'&name','&mark'); Enter value for id: 1 Enter value for name: aaa Enter value for mark: 90 old 1: insert into function values(&id,'&name','&mark') new 1: insert into function values(1,'aaa','90') Enter value for id: 2 Enter value for name: bbb Enter value for mark: 99 old 2: insert into function values(&id,'&name','&mark') new 2: insert into function values(2,'bbb','99') insert into function values(2,'bbb','99') * ERROR at line 2: ORA-00933: SQL command not properly ended SQL> insert into function values(&id,'&name','&mark'); Enter value for id: 1 Enter value for name: sara Enter value for mark: 99 old 1: insert into function values(&id,'&name','&mark') new 1: insert into function values(1,'sara','99') insert into function values(1,'sara','99') * ERROR at line 1: ORA-00942: table or view does not exist SQL> insert into function values(&id,'&name','&mark'); Enter value for id: 1 Enter value for name: ddd Enter value for mark: 89 old 1: insert into function values(&id,'&name','&mark') new 1: insert into function values(1,'ddd','89') insert into function values(1,'ddd','89') * ERROR at line 1: ORA-00942: table or view does not exist SQL> insert into function values(&id,'&name','&mark'); Enter value for id: 1 Enter value for name: aaa Enter value for mark: 87 old 1: insert into function values(&id,'&name','&mark') new 1: insert into function values(1,'aaa','87')

Enter value for id: 5 Enter value for name: eee Enter value for mark: 99 old 1: insert into func values(&id. SQL> insert into func values(&id.'&name'.'&name'.'bbb'.'98') 1 row created. Enter value for id: 4 Enter value for name: ddd Enter value for mark: 97 old 1: insert into func values(&id.'99') 1 row created.'&mark') new 1: insert into func values(2.---------aaa 87 bbb 99 ccc 98 ddd 97 eee 99 .'&name'.'eee'.'&name'.'&mark').'&mark'). SQL> insert into func values(&id. Enter value for id: 2 Enter value for name: bbb Enter value for mark: 99 old 1: insert into func values(&id. Enter value for id: 1 Enter value for name: aaa Enter value for mark: 87 old 1: insert into func values(&id.'&mark') new 1: insert into func values(4. SQL> insert into func values(&id. ROLL ---------1 2 3 4 5 NAME MARK ---------.'87') 1 row created.'99') 1 row created.'ddd'.'&mark') new 1: insert into func values(5.'&name'.'&mark'). SQL> select*from func.'&name'.'&mark').'&name'.'87') * ERROR at line 1: ORA-00942: table or view does not exist SQL> insert into func values(&id.'&name'.'ccc'.'aaa'.'&mark').'&mark') new 1: insert into func values(3.'97') 1 row created.'&name'. SQL> insert into func values(&id.insert into function values(1.'aaa'. Enter value for id: 3 Enter value for name: ccc Enter value for mark: 98 old 1: insert into func values(&id.'&mark') new 1: insert into func values(1.'&name'.

'come')from dual. SUBS ---welc SQL> select substr('welcome'.'come')from dual * ERROR at line 1: .4)from dual. UPPER(NAME ---------AAA BBB CCC DDD EEE SQL> select lower(name) from func. LOWER(NAME ---------aaa bbb ccc ddd eee SQL> select initcap(name 2 SQL> SQL> SQL> SQL> select initcap(name) from func.'come')from dual.1. select substr('welcome'.'come')from dual. select trim('welcome'.'come')from dual * ERROR at line 1: ORA-00904: "ITRIM": invalid identifier SQL> select trim('welcome'.'come')from dual * ERROR at line 1: ORA-01722: invalid number SQL> select itrim('welcome'.SQL> select upper(name) from func. INITCAP(NA ---------Aaa Bbb Ccc Ddd Eee SQL> select substr('welcome'. select itrim('welcome'.

TRANSLATE('B -----------jack jil joy SQL> select*from func where namelike'b%'.'come')from dual. LTRIM(' ------welcome SQL> select rtrim('welcome'.'b')from dual. select*from func where namelike'b%' * ERROR at line 1: ORA-00920: invalid relational operator SQL> select*from func where name like 'b%'.'#')from dual.ORA-00907: missing right parenthesis SQL> select lpad('hello'.'b')from dual * ERROR at line 1: ORA-00909: invalid number of arguments SQL> select translate('back bil boy'.'b'.---------. RTR --wel SQL> select rpad('hello'. LPAD('HELL ---------#####hello SQL> select ltrim('welcome'.10.'j')from dual. select translate('back jil'.'b')from dual.'come')from dual.---------2 bbb 99 SQL> select avg(mark) from func. RPAD('HELL ---------hello##### SQL> select replace('jack jil'. .10. REPLACE( -------jack jil SQL> select translate('back jil'. ROLL NAME MARK ---------.'#')from dual.

3) ---------27 SQL> select trunc(901.9956) from dual. MAX(MARK) ---------99 SQL> select count(mark)from func. .9956) --------------901 SQL> select trunc() from dual.3) from dual. ABS(-5) ---------5 SQL> select power(3. SUM(MARK) ---------480 SQL> select variance(mark)from func. STDDEV(MARK) -----------5. VARIANCE(MARK) -------------26 SQL> select stddev(mark)from func. COUNT(MARK) ----------5 SQL> select sum(mark)from func.09901951 SQL> select abs(-5) from dual.AVG(MARK) ---------96 SQL> select min(mark)from func. TRUNC(901. POWER(3. MIN(MARK) ---------87 SQL> select max(mark)from func.