there is A table and B table in A table there 5 rows and in
b table there are 2 rows i am firing query select * from
a,b what will be the output?

Answers were Sorted based on User's Feedback



there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / santosh pashte

It is concept of CROSS JOIN..

It will display 5 * 2 = 10 rows

Is This Answer Correct ?    41 Yes 4 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / subbu

It is a cross join

So, the output is 5*2=10

Is This Answer Correct ?    13 Yes 0 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / manda

It gives a cartesian product or a cross product.

Is This Answer Correct ?    11 Yes 1 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / mubin ahmad

select * from a,bwill be the out put in 10 rows

Is This Answer Correct ?    11 Yes 2 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / dharmendra singh

Concept of cross join
the result will be 10 bcos 5*2 = 10

Is This Answer Correct ?    9 Yes 0 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / sirisha

5*2=10
Its a cartesian product

Is This Answer Correct ?    6 Yes 0 No

there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing q..

Answer / v.g.venkatesh babu

It gives error. If you want to access the data from two tables then we must use JOINS concept... so we need to use aliasis names for tables...

* so both tables A and B must have same no. of fields with same datatypes then only we can use joins.

*Both tables must associated with forign key...

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on <table name> begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 Answers  


Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance

5 Answers   Target,


How many indexes can be created on a table in sql?

0 Answers  


What is recursive join in sql?

0 Answers  


What are character functions in sql?

0 Answers  






Write a query to find the employees from EMP table those who have joined in Monday. (there is a column as hiredate which is a date column i.e values are like 03-DEC-81)

5 Answers  


What is view explain with example?

0 Answers  


Explain how procedures and functions are called in a PL/SQL block ?

3 Answers  


How many rows will return from dual table?

4 Answers   Fujitsu,


Explain how to use transactions efficiently : transact sql

0 Answers  


Can you have multiple SPs with the same name on a database?

6 Answers   CGI,


What is the sql case statement?

0 Answers  


Categories