How to create a view with data from multiple tables?



How to create a view with data from multiple tables?..

Answer / 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

More SQL Server Interview Questions

how to get rank of diffrent student in same table based on newly inserted row in sql server2008

4 Answers   ABC,


What are the database objects? : SQL Server Architecture

1 Answers  


How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?

1 Answers  


What do u mean by orphan users, how will u list them in the DB

2 Answers   IBM,


How you can add messages to the nt event log from within a stored procedure?

1 Answers  


What is single-user mode and what are the steps you should follow to start sql server in single-user mode?

1 Answers  


What is a full text index?

1 Answers  


how to get max salary with employee number by using one select query and max function ??

3 Answers   Genpact,


What is the difference between a view and a stored procedure?

1 Answers  


What are the types of joins in sql?

1 Answers  


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

1 Answers  


what is the Surrogate key?and wt is the diff between Primary key and Surrogate Key?

2 Answers  


Categories