What is a Table?
A table is an structure in which the datat is stored, It can contain rows and columns. Columns are used to categorize the data and rows contain the actual data. For example if a company contains its user's data in a table named 'Users' then the table structure may look like this:
User Id | User Name | Password | |
1 | John | john@example.com | 123 |
2 | Smith | smith@example.com | 456 |
In the above example, A company's users table is shown, it contains 4 columns and 2 rows. 4 columns are the categories and 2 rows are actual data. It is not mandatory that each row contains all the columns, some times rows can contain empty columns.
What is a Query?
A query is an statement used to manipulate the data in the database. You can write queries to Insert, retrieve, delete, and update the data and also to perform any action on the data present in the database.A sample query may look like this:
SELECT email FROM usersThe above statement is used to retrieve all the emails from the users table. So the output of the above query will be like this:
john@example.com |
smith@example.com |
Well I guess that's all for the introduction, further details will be discussed in the later lessons. For any queries or questions should you have, feel free to comment.
Previous Lesson --- Next Lesson
No comments:
Post a Comment