c#simple update query无法正常工作

时间:2015-09-18 20:26:24

标签: c#

//codepen.io/OlxandrPopov/pen/xwVBKg

年份和身份均为SqlConnection conn = new SqlConnection(@"Data Source=SAI\SQLEXPRESS;Initial Catalog=testing;Integrated Security=True;Pooling=False"); conn.Open(); SqlCommand command = new SqlCommand(); string test = "UPDATE attend Year='2014' WHERE Id = '2'"; command = new SqlCommand(test, conn); command.ExecuteNonQuery(); conn.Close(); 。错误是:

  

年度'

附近的语法不正确

1 个答案:

答案 0 :(得分:3)

应该是:

session.query(Frame).join(DSequence).join(Subject).join(DSource).filter(DSource.source_id==2).all()