Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How to Create view based on table-join query

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 12-08-2009
Member
 
Join Date: Feb 2009
Posts: 78
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
Reply With Quote
  #2  
Old 12-08-2009
Member
 
Join Date: Dec 2008
Posts: 69
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.
Reply With Quote
  #3  
Old 12-08-2009
Member
 
Join Date: Oct 2008
Posts: 181
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.
Reply With Quote
  #4  
Old 12-08-2009
Member
 
Join Date: Jan 2009
Posts: 150
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.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software


Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 12:25 PM.