Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.73/5 (3 votes)
See more:
What is the difference between view and tables in sql
Posted
Updated 11-Feb-18 22:04pm

The question is totally incorrect, like most question about "differences". Why asking if you apparently have Internet access? You could just read:
http://en.wikipedia.org/wiki/View_%28database%29[^].

—SA
 
Share this answer
 
Comments
durga.r 15-Dec-12 3:55am    
Then y u r in a member of this code project
Sergey Alexandrovich Kryukov 15-Dec-12 21:32pm    
First of all, have a little respect to members, stop using your 'y', 'u', 'r', etc. — there are no such English words. And then, if you saying has some meaning, feel free to explain it to us.

Good luck,
—SA
mochammad.yusup 27-Oct-14 23:59pm    
I think we should also respect those who ask the question by giving them the proper answer instead of blaming them for asking 'stupid' question. Some people might easily feel disrespected.
Sergey Alexandrovich Kryukov 28-Oct-14 0:37am    
Nobody is blaming anyone for a stupid question; this is your own idea and your word. You are perfectly right, but I think this answer is "proper enough". OP will read it, referenced article, understand it, and also get an idea hot to find the information next time. Is it any bad? :-)
As to the use of code speak, this site have a pretty established culture of not accepting it, expressing everything using full spelling, punctuation and casing...
—SA
Member 10973447 31-Mar-16 16:40pm    
agree
A table contains data, a view is just a SELECT statement which has been saved in the database (more or less, depending on your database).

The advantage of a view is that it can join data from several tables thus creating a new view of it. Say you have a database with salaries and you need to do some complex statistical queries on it.

Instead of sending the complex query to the database all the time, you can save the query as a view and then SELECT * FROM view..

In case the other explanations are too technical for you:

- Tables are the actual database entities that hold your rows.

- Views are "imaginary" tables that are constructed based on the actual tables.

Tables as you know store the actual data. Views will require and use actual columns from the actual tables. The rows are filtered in your SQL statement when creating the view. Views allows for easier viewing of tables and/or access to data in the tables when multiple tables are joined are joined. They are typically used to viewing specific data sets for easy access or decision making. For example, I have a view that is constructed based on my Customer and Order table. This view only has the columns that I need to fill out invoices. Having this view will save on typing SQL statements to join the two tables (and the rest of the logic) and output specific columns and rows while I can just use a select all statement to get all I need (all of course must be defined in view when creating it; other select statements can further filter a view). There are limitations and restrictions to updating and deleting from views. That I will leave you to read up on.

Source : Stack overflow[^] & yahoo[^]
 
Share this answer
 
Comments
Girish Kalamati 6-Jan-15 3:44am    
Thumbs up
1st:-

Table : Relational Database is composed of tables that contain related data.
View :
1. Views are created from one or more than one table by joins, with selected columns.

2. Views acts as a layer between user and table.

3. Views are created to hide some columns from the user for security reasons, and to hide information exist in the column.

4. Views reduces the effort for writing queries to access specific columns every time.

5. Reports can be created on views.

6. View doesn't contain any data.

2nd:-
Table comprises of rows and columns, columns representing
fields and rows containing the data or records.

View is a imaginay table which contains data at run time.

3rd:-
view is a virtual table based on the result-set of an SQL
statement.

A 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.

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.

4:-
View is a virtual table. Like table it contains fields but
it does not contain any data.In run time it contains the
data and after that it gets free.But table stores the datas
in database occupy some space.
 
Share this answer
 
Comments
Ziee-M 12-Feb-18 7:38am    
I dont know how or why this answer have been downvoted ! my 5, intresting summary of views

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900