|
| |||||||||
| Tags: sql, table join, view based query, view table |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to Create view based on table-join query
How to Create view based on table-join query, I have tried out the following code in my program which works fine but when i use this same for table-join, it does not allow me to do so, so I am confused how do use this same code in my program. Code: CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition |
|
#2
| |||
| |||
| Re: How to Create view based on table-join query
The code that you have mentioned in your view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database. When the CREATE VIEW statement is executed, metadata describing the view table is stored in the database catalog. You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table. |
|
#3
| |||
| |||
| Re: How to Create view based on table-join query
A primary key is a column (or a combination of columns) with a unique value for each row. The view table is always identical to the table you would obtain as the result of the QUERY expression (query_expression). Each primary key value must be unique within the table. The QUERY expression must not contain a parameter specification or a TOP syntax element. The table expressions of the QUERY specification in the QUERY expression of the CREATE VIEW statement must not contain a QUERY expression. Tables in a database are often related to each other with keys. |
|
#4
| |||
| |||
| Re: How to Create view based on table-join query
An updateable join view table is an updateable view table for which the following conditions must also be fulfilled, "Horizontally merge (combine, match, union) two MS SQL Server tables into one by" BrothersoftEditor: Horizontally merge (combine, match, union) two MS SQL Server tables into one by a common column (field) of data. The two tables are not changed, a new table is created with the results. No complicated options or SQL knowledge required. you can free download MS SQL Server Join Two Tables Software 7.0 now. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to Create view based on table-join query" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Join two tables using SQL query | vaib288932 | Software Development | 3 | 20-08-2010 12:01 PM |
| How to create a query on datagrid view in vb.net | Ainsley | Software Development | 3 | 10-12-2009 09:59 PM |
| SQL query to return unique output based two fields from one table | Jabeen | Software Development | 3 | 16-11-2009 12:29 PM |
| Sql query with join | AZUL | Software Development | 6 | 07-11-2009 12:00 AM |
| Create Table(s) and View(s) | Fletcher Hearns | Microsoft Project | 1 | 15-10-2008 03:08 AM |