一只甜甜圈
一般写法:insert into admin values('1112','1112')或者(建议带着字段列表)insert into admin(col1,col2) values('1112','1112')说到占位符,具体开发语言不一样,写法也不一样的:比如java:PreparedStatement ps=null; //创建PreparedStatement 对象String Sql = “ INSERT INTO admin(col1,col2) VALUES(?,?)”;ps=conn.prepareStatement(sql);ps.setString(1, '1112');ps.setString(2, '1112');int i=ps.executeUpdate();再比如C#:string sqlIns = "INSERT INTO admin((col1,col2) VALUES (@v1, @v2)";SqlCommand cmdIns = new SqlCommand(sqlIns, sqlconn);cmdIns.Parameters.Add("@v1", "1112");cmdIns.Parameters.Add("@v2", "1112");cmdIns.ExecuteNonQuery();大致如此