Tuesday, May 11, 2021

Creating a Table in MySQL and Inserting some data

 MySqlCommand cmd = new MySqlCommand("CREATE TABLE MyTable (ID Integer, Data varchar(50))", conn);

cmd.ExecuteNonQuery();


cmd = new MySqlCommand("INSERT INTO MyTable (ID, Data) VALUES (1, 'May11 2021');", conn);
cmd.ExecuteNonQuery();

No comments:

Post a Comment

Creating a LAMP stack on AWS Free Tier

  https://shawn-shi.medium.com/how-to-host-a-lamp-web-application-server-on-aws-ec2-for-free-8f6fc61463ed#:~:text=Its%20free%20tier%20allows...