Topic: SQL*Plus and PL/SQL >> sql queries
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| jeeva |
Posted: Oct 30, 2007 08:31:45 AM |
Total Post: 11
Joined: Oct, 2007
|
create table table1(A number(5),B number(5));
insert into table(A,B) values(3,7);
insert into table(A,B) values(1,5);
insert into table(A,B) values(null,4);
insert into table(A,B) values(2,6);
1> select * from table1 orderby null;
2> select "*" from table1;
3> select a,count(a) from table1 groupby(a);
4> select 'a'+'b' from table1;
5> select "a"+"b" from table1;
6> select sum(0) from table1;
7> select sum(1) from table1;
8> select sum(null) from table1;
9> select all rows from the table1 using "join" clause
10> select 'b' 'a','a' 'b' from table1 orderby 1;
11> select sum(a+b) from table1;
12> select avg(0) from table1;
can any one give the o/p of each query?.
|
|
|
yash |
| Posted: Oct 30, 2007 09:09:01 AM | |
|
Total Post: 16
Joined: Jan, 2007
|
hii
hey during insert statment u r using roung table that why u r not getting any row ?
if u give correct table name then u get ur result
insert into table1(A,B) values(3,7);
then u run ur quary--
SQL> select * from table1 order by null;
A B
---------- ----------
3 7
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gopu Gopi | 335 |
| Gitesh Trivedi | 322 |
| Vinoth Kumar | 264 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|