NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

SQL> select 200+300 from dual;

200+300
----------
500

SQL> select sysdate from dual;

SYSDATE
---------
11-OCT-22

SQL> select add_months('11-oct-22',4) from dual;

ADD_MONTH
---------
11-FEB-23

SQL> select months_between('11-oct-22','11-dec-22') from dual;

MONTHS_BETWEEN('11-OCT-22','11-DEC-22')
---------------------------------------
-2

SQL> select last_day('11-oct-22') from dual;

LAST_DAY(
---------
31-OCT-22

SQL> select next_day('11-oct-22',4) from dual;

NEXT_DAY(
---------
12-OCT-22

SQL> select pow(22,4)from dual;
select pow(22,4)from dual
*
ERROR at line 1:
ORA-00904: "POW": invalid identifier


SQL> select power(22,4) from dual;

POWER(22,4)
-----------
234256

SQL> select max(45,92,34) from dual;
select max(45,92,34) from dual
*
ERROR at line 1:
ORA-00909: invalid number of arguments


SQL> select greatest(45,92,34) from dual;

GREATEST(45,92,34)
------------------
92

SQL> select least(45,92,34) from dual;

LEAST(45,92,34)
---------------
34

SQL> select squareroot(81) from dual;
select squareroot(81) from dual
*
ERROR at line 1:
ORA-00904: "SQUAREROOT": invalid identifier


SQL> select square_root(81) from dual;
select square_root(81) from dual
*
ERROR at line 1:
ORA-00904: "SQUARE_ROOT": invalid identifier


SQL> select power(81,2) from dual;

POWER(81,2)
-----------
6561

SQL> select sqrt(81,2) from dual;
select sqrt(81,2) from dual
*
ERROR at line 1:
ORA-00909: invalid number of arguments


SQL> select sqrt(81) from dual;

SQRT(81)
----------
9

SQL> select roundoff(46.2745,2) from dual;
select roundoff(46.2745,2) from dual
*
ERROR at line 1:
ORA-00904: "ROUNDOFF": invalid identifier


SQL> select round_off(46.2745,2) from dual;
select round_off(46.2745,2) from dual
*
ERROR at line 1:
ORA-00904: "ROUND_OFF": invalid identifier


SQL> select round(46.2745,2) from dual;

ROUND(46.2745,2)
----------------
46.27

SQL> select trunc(46.2745,2) from dual;

TRUNC(46.2745,2)
----------------
46.27

SQL> select 536%10 from dual;
select 536%10 from dual
*
ERROR at line 1:
ORA-00911: invalid character


SQL> select mod(536,10) from dual;

MOD(536,10)
-----------
6

SQL> create table employee(eid numeric(10),e_name varchar(20),salary numeric(20));

Table created.

SQL> insert into employee values(1,'Rakesh',2000);

1 row created.

SQL> insert into employee values(2,'Mukesh',3000);

1 row created.

SQL> insert into employee values(3,'Diya',5000);

1 row created.

SQL> insert into employee values(4,'Naina',12500);

1 row created.

SQL> select * from employee;

EID E_NAME SALARY
---------- -------------------- ----------
1 Rakesh 2000
2 Mukesh 3000
3 Diya 5000
4 Naina 12500

SQL> select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary ) as final salary from employee;
select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary ) as final salary from employee
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected


SQL> select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary ) as final salary from employee;
select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary ) as final salary from employee
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected


SQL> select 0.02*salary as TA ,0.05*salary as DA,(0.02*salary+0.05*salary) as total from employee;

TA DA TOTAL
---------- ---------- ----------
40 100 140
60 150 210
100 250 350
250 625 875

SQL> select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary as sal ) as final salary from employee;
select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary as sal ) as final salary from employee
*
ERROR at line 1:
ORA-00907: missing right parenthesis


SQL> select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary ) as final salary from employee;
select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary ) as final salary from employee
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected


SQL> select 0.02*salary as TA ,0.05*salary as DA,0.10*salary as HRA ,0.04*salary as COMM,( 0.02*salary+0.05*salary+0.10*salary+0.04*salary+salary ) as final_salary from employee;

TA DA HRA COMM FINAL_SALARY
---------- ---------- ---------- ---------- ------------
40 100 200 80 2420
60 150 300 120 3630
100 250 500 200 6050
250 625 1250 500 15125

SQL> select salary from employee where salary between 2000 and 3000 order by salary asc;

SALARY
----------
2000
3000

SQL> select salary from employee where salary in(12500,3000,5000);

SALARY
----------
3000
5000
12500

SQL> insert into employee values(5,'suresh',1000);

1 row created.

SQL> select ename from employee where ename like %s;
select ename from employee where ename like %s
*
ERROR at line 1:
ORA-00911: invalid character


SQL> select ename from employee where ename like '%s';
select ename from employee where ename like '%s'
*
ERROR at line 1:
ORA-00904: "ENAME": invalid identifier


SQL> select e_name from employee where e_name like %s;
select e_name from employee where e_name like %s
*
ERROR at line 1:
ORA-00911: invalid character


SQL> select ename from employee where ename like '%s';
select ename from employee where ename like '%s'
*
ERROR at line 1:
ORA-00904: "ENAME": invalid identifier


SQL> select e_name from employee where e_name like '%s';

no rows selected

SQL> select * from employee
2 ;

EID E_NAME SALARY
---------- -------------------- ----------
1 Rakesh 2000
2 Mukesh 3000
3 Diya 5000
4 Naina 12500
5 suresh 1000

SQL>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.