Difference between Table and Views?
Loading
Difference between Table and Views?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Oct 28, 2025, 12:31 PM
Hello Baibhav,
Table
A table is a physical storage structure in a database that holds data in rows and columns.
Key Features:
Stores actual data.
Can be modified directly (INSERT, UPDATE, DELETE).
Has indexes for performance optimization.
Data persists until explicitly deleted.
Example:
?? View
A view is a virtual table based on the result of a SQL query. It does not store data itself.
Key Features:
Does not store data; it displays data from one or more tables.
Acts as a saved query.
Can simplify complex queries.
May or may not be updatable (depends on the SQL dialect and view definition).
Useful for security (restricting access to specific columns/rows).
Example:
?? Summary Table
Thanks
Sandhiya PriyaPosted Oct 27, 2025, 5:00 AM
What is a Table?
A table is a physical structure in a database that stores data permanently in rows and columns.
Example:
Here,
Employeesis a table that physically stores data.Key Points:
Stores actual data.
Consumes physical storage space.
Can have indexes, primary/foreign keys, constraints.
Data can be modified directly (
INSERT,UPDATE,DELETE).What is a View?
A view is a virtual table based on the result of a SELECT query.
It doesn’t store data physically; it just displays data from one or more tables.
Example:
Here,
EmpDetailsis a view that shows filtered data fromEmployees, but the data actually resides in the Employees table.Key Points:
Virtual table (no physical data storage).
Stores only the query, not data.
Used to simplify complex queries.
Provides security by restricting access to certain columns/rows.
You can read/update data (in some cases) through views if based on a single table.
Difference Between Table and View
Example Scenario
Suppose you have a table:
Now, if you want only HR department details:
Now you can query:
— which is much simpler and more secure (hides other departments).
Interview Tip: A table holds data physically, while a view provides a virtual, logical representation of data derived from one or more tables.
KritikaPosted May 22, 2025, 4:40 AM
In a database, a table is like a container where actual data is stored. It has rows and columns, like an Excel sheet. You can add, change, or delete data in a table directly. A view, on the other hand, is not a real table. It just shows data from one or more tables, based on a saved query. Views are helpful when you want to see only part of the data or want to make complex queries easier. You can use a view like a table, but you usually can’t change data through a view.
Table:
View:
Alpesh ManiyaPosted May 19, 2025, 12:26 PM
A table stores the actual data, while a view is the combination of one or more tables logically. It simplifies the use and security. if we don't want to expose the columns directly from the table, then we can prepare the view, and it will be accessible in the same way as the table.
Riya PatelPosted May 19, 2025, 10:12 AM
Tables store actual data in the database, while Views are virtual tables that show data from one or more tables without storing it themselves. Views are used to simplify complex queries or hide specific columns for security.
Sangeetha SPosted May 19, 2025, 9:23 AM
CREATE VIEW IT_Employees AS
SELECT Name FROM Employees WHERE Department = 'IT';
CREATE TABLE Employees (
ID INT,
Name VARCHAR(100),
Department VARCHAR(50)
);
Nitin PanditPosted May 19, 2025, 9:18 AM
A table is a physical structure within a database that stores data in rows and columns, while a view is a virtual table that provides a simplified or customized presentation of data from one or more underlying tables.