View
-
Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance
suchita
-
Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance
suchita
SayamiSuchi wrote:
1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?
You can't insert data into View.
SayamiSuchi wrote:
3. what is the difference between using view and actual table ?
Difference between View and table[^] Check this[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com
-
Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance
suchita
-
SayamiSuchi wrote:
1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?
You can't insert data into View.
SayamiSuchi wrote:
3. what is the difference between using view and actual table ?
Difference between View and table[^] Check this[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com
Blue_Boy wrote:
You can't insert data into View.
According to this you can: Modifying Data Through a View[^]
-
SayamiSuchi wrote:
1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ?
You can't insert data into View.
SayamiSuchi wrote:
3. what is the difference between using view and actual table ?
Difference between View and table[^] Check this[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.cacttus.com
Blue_Boy wrote:
You can't insert data into View.
Actually, most modern databases support what is called "updatable views". If your view does not contain calculated columns and the base tables have a default defined on the columns not selected in the view, then the view must be updatable.
-
Hi, I am using dot net and sql server. I am sending my data from the database table to the pdf file. It looks using lots of tables to get data slowing down the program and so I tend to use the view instead of tables. Will it be the good idea to use view and if yes, i have few more questions. 1. When are we inserting data to the view. Is that when we are inserting data to the actual table or anytime ? 2. If I insert data in the view, will the data be there once i close my program?( I am assuming view as the cache table) 3. what is the difference between using view and actual table ? 4. How the use of view and table different? Thanks in advance
suchita
A "view" is a way of looking at data stored in table(s), therefore using a view instead of the underlying base table will not solve your performance issue. If your query is slow, consider these tips: 1. Index your base table(s). 2. Use a WHERE clause to filter only those rows that is needed. 3. Select only the required columns (don't use a * in the SELECT statement).