--显示sql server现有的所有数据库
exec sp_helpdb

Sql-exec

--查看数据表设置的约束

exec sp_helpconstraint SubjectType

Sql-exec

--update select出来的结果集的字段
update QuestionToAnswer
    set IsDel=1,Marker=15,MarkingTime=getdate()
    where ID in
    (select QTA.ID from QuestionToAnswer QTA    --QTA.ID,QTA.StudentID,QTA.IsDel,QTA.Score
    inner join TClassStudent TCS on QTA.StudentID=TCS.StudentID and QTA.IsDel=0 and TCS.IsDel=0
    where QTA.QuestionID=52 and TClassID=9)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-11-22
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2021-06-23
相关资源
相似解决方案