sql语句:INSERT INTO `vol`.`test_number`(`ProductCode`, `ProductName`, `NumberQty`) VALUES ('tt', 'ss', 199);用SqlSugar写这个SQL语句
时间: 2023-04-10 16:01:06 浏览: 144
SQL_INSERT_INTO_语句
Sure, here's how you can write this SQL statement using SqlSugar:
var db = new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = "your_connection_string_here",
DbType = DbType.MySql, // or DbType.SqlServer, DbType.Oracle, etc.
IsAutoCloseConnection = true
});
var testNumber = new TestNumber()
{
ProductCode = "tt",
ProductName = "ss",
NumberQty = 199
};
db.Insertable(testNumber).ExecuteCommand();
Note: You need to replace "your_connection_string_here" with your actual database connection string, and define the TestNumber class with the same properties as the test_number table.
阅读全文