Today was my first day of learning SQL and my interaction with it was very unique its not like excel its different.
First I learned that database is a collection of data.
Then I learned about two types of database.
- Relational Database:Data is stored in the form of rows and columns in it.MySQL,PostgreSQL etc are some examples.
2.NoSQL Database:Data is stored in non tabular form such as json files,documents etc.
- Then I studied about the CRUD operations in SQL using various SQL commands.
1.SHOW DATABASE:To show the databases lying in my sql application.
2.CREATE DATABASE:To create a new database in my sql application.
3.USE:After creating the database I used this command to use the database I created.
4.SELECT DATABASE():Then I used this command to know whether the database I created is selected or not for doing further operations.
5.CREATE TABLE:I used this command to create a table inside my database.And I also added which datatype will be added in given details.And I also added NOT NULL command,so that my entries would not get any null values.
6.DESC:This command I used to get the description of table.
7.INSERT INTO:Then I used this command to insert the specific details of each features in the column.
8.SELECT:This command is use to retreive rows of data from the table I created.
9.FROM:This command is use to specify the tables from which you want to retrieve or delete the data.
10.UPDATE:This command is use to update the details inside the table in MySQL.
11.DELETE:It is use to delete specific feature inside the table in MySQL.
- The issues that I encountered and how I fixed it
1.While running the create table command it told my you have a syntax error then I saw that a comma(,) is missing after filling the datatype of EID then I put the comma and my command ran.
2.I was not able to implement the INSERT INTO command then I saw that in the varchar datatype inputs I forgot to put quotation marks then I put the quotation marks and my command ran properly.
And in this way I learned SQL and solved the issues I encountered today.
Top comments (0)