We have two tables,

Table1 - 5 Columns, 10 Rows

Table2 - 2 Columns, 5 Rows

.

What will be the output of the following SQL query? SELECT * FROM Table1 CROSS JOIN Table2

O 7 Columns, 15 Rows

O 7 Columns, 50 Rows

O 10 Columns, 15 Rows

O 10 Columns, 50 Rows​

Respuesta :

Answer:

7 Columns, 50 Rows

Explanation:

Given

Table 1

[tex]Columns = 5[/tex]

[tex]Rows = 10[/tex]

Table 2

[tex]Columns = 2[/tex]

[tex]Rows = 5[/tex]

SQL join: Cross Join

Required

The number of rows and columns

In cross join, the number of rows that will be returned is calculated using:

[tex]Rows = Row_1 * Row_2[/tex]

So, we have:

[tex]Rows = 10 * 5[/tex]

[tex]Rows = 50[/tex]

Since all columns in both tables are selected, the new table will have the following  number of columns

[tex]Columns = Column_1 + Column_2[/tex]

So, we have:

[tex]Columns = 5 + 2[/tex]

[tex]Columns = 7[/tex]

ACCESS MORE