表格插入列
我想在 建好的表格中 插入一列 用命令 怎么实现呀
insert into table_name(colname1,colname2...) values(value1,value2...)
//在数据表中添加数据列 string MySQL = "ALTER TABLE 商品清单 ADD [检验员] [varchar] ([color=#800000; font-weight: bold]50[/color]) NULL;"; SqlConnection MyConnection = new SqlConnection("Data Source = .;Database = MyDatabase;Integrated Security=SSPI"); SqlCommand MyCommand = new SqlCommand(MySQL, MyConnection); try { MyCommand.Connection.Open(); MyCommand.ExecuteNonQuery(); MessageBox.Show("成功在“商品清单”数据表中添加数据列", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } finally { MyConnection.Close(); }