adspace


How to create a view with data from multiple tables?

Answer Posted / Asha Sharma

To create a view with data from multiple tables in SQL Server, you can use the following example:

```sql
CREATE VIEW your_view AS
SELECT Table1.column1, Table2.column2
FROM Table1
INNER JOIN Table2 ON Table1.common_column = Table2.common_column;
```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is clustered index

1093


What is self contained sub query?

1147


When should you use an instead of trigger?

1061


How do I find query history in sql server?

1032


Can we do dml on views?

1041


How can you append an identity column to a temporary table?

1076


Equi join and non equi join is possible with sql server?

1139


What is acid mean in sql server?

1257


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1031


What is an indexed view?

1029


What is in place upgrade in sql server?

1137


How efficient you are in oracle and SQL server?

1269


How do I start sql server 2017?

1023


List the ways in which dynamic sql can be executed?

1093


Can one drop a column from a table?

1098