Month: March 2019

MySQL INSERT data in Table

In this post we will explore INSERT command to insert data into MySQL table. This command lets you to insert single as well as multiple records into table. Syntax Example – Multiple record with mapping Here we are adding 2 records to table. values should be in same order as keys. You can find output …

MySQL INSERT data in Table Read More »

MySQL DROP Table

We will explore DROP table command in this post. This command let you delete table along with all the data. Syntax Example This will delete the users table along with all of its data. Do use this command with caution as this will remove schema info of table.

MySQL TRUNCATE Table

In this post we will explore MySQL TRUNCATE command. This command lets you delete data from you database without deleting table schema. So when to delete whole data from MySQL table then just use this command. Syntax Example This will delete all the records present in users table. Output mysql> SELECT * FROM users; +———+————+———–+ …

MySQL TRUNCATE Table Read More »

MySQL ALTER Table

In this post we will look into ALTER table command. This command lets you make schema changes in existing table. This Command lets you add new column, modify existing column, rename existing column, rename the table. We will be altering users table which we in our last post. Table of Content Add new column in …

MySQL ALTER Table Read More »

MySQL CREATE Table

In this post we will learn how to create a table in MySQL. In last posts we learned how to create,use and drop a database. Now we will start learning operations for table. Syntax To create MySQL table we will need following information. Table name Column name Column destinations/types Example In this example we have …

MySQL CREATE Table Read More »

MySQL DELETE Database

In this post we will learn how to delete a database in MySQL. Some time we need to delete a database so we need to use this command. Syntax Example This command will delete the user_service database from your MySQL server. All the data and tables will be deleted and this cannot be recovered. So …

MySQL DELETE Database Read More »

MySQL SELECT Database

In this blog post we will learn how to select a database from list of databases to work on it. So to run command on database first you have to select that database on you MySQL server. Syntax Example This command will select user_service database. Now we can do operations on that database. To select …

MySQL SELECT Database Read More »

MySQL CREATE Database

In this post i will be explaining how to create a database using MySql. Syntax Example This will create a database named user_service. At this time our MySql server might have many databases. We can list all the databases using following command. If you have any doubts or suggestions then please comment below.