Thursday, May 21, 2015

How to insert data into MySQL table?

I have just finished creating all the tables in the database, now it's time to insert some data manually.

I have not found out how to use MySQL for Visual Studio to do so, so I just used the MySQL Command Line Client.

mysql> INSERT INTO zef_status
             -> (Name)
             -> VALUES
             -> ("Active");

-> indicate a new line. It occurs when we press Enter.

We can also write the INSERT statement in one line:
mysql > INSERT INTO zef_status (Name) VALUES ("Inactive");

I will need to figure out how to connect to MySQL database in my ASP.NET project soon.

No comments:

Post a Comment