Differences
|
|
Oracle
|
PostgreSQL
|
Total Database Tables
·
select * from
tab;
|
Total Database Tables
·
select * from
pg_tables where schemaname='public';
|
Table Description
·
desc demo;
|
Table Description
·
select * from
demo;
|
Table Creation
·
create table
emp (eno integer , ename varchar2(25),dob date);
|
Table Creation
·
create table
emp (eno integer , ename character varying(25),dob date);
|
Insert Row
·
insert into emp
values(100,'Suresh','10-jan-1990');
|
Insert Row
·
insert into emp
values(100,'Suresh','10-jan-1990');
|
Insert Null Value to Date
·
insert into emp
values(101,'Ramesh','');
|
Insert Null Value to Date
·
insert into emp
values(101,'Ramesh',null);
|
Update Row
·
update emp set
eno='102' where ename='Ramesh';
|
Update Row
·
update emp set
eno='102' where ename='Ramesh';
|
Insert null to Integer
·
insert into emp
values('','Vijay','10-mar-1988');
|
Insert null to Integer
·
insert into emp
(ename,dob) values('Vijay','10-mar-1988');
|
Insert null to String
·
insert into emp
values(104,'','10-mar-1980');
|
Insert null to String
·
insert into emp
values(104,'','10-mar-1980');
|
Insert null to String
·
insert into emp
values(105,null,'10-mar-1980');
|
Insert null to String
·
insert into emp
values(105,null,'10-mar-1980');
|
Retrive Null Value Row
·
select
eno,nvl(ename,'test'),dob from emp ;
|
Retrive Null Value Row
·
select
eno,coalesce(ename,'test'),dob from emp ;
|
Welcome aboard ClearOS fellas. Here you Learn about ClearOS, Android, useful tips & tricks, tutorials and discussion. Find my ClearOs videos at my YouTube Profile. http://www.youtube.com/user/8bitzs
You can visit my below YouTube channel to refresh your mood. You will get some funny stuff. http://www.youtube.com/user/clearx
Sunday, 11 October 2015
Differences Between Oracle and PostgreSQL Queries
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment