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

OneNote Math Operations

  Supported arithmetic operators Operator Meaning Example +  (plus sign) Addition 3+3 -  (minus sign) Subtraction Negation 3-1 -1 *  (asteri...