如果你想插入的字段取值方式不同,既有自己设定的值,又想插入某个表中的某个字段数据,下面就举例说明

 

insert into Meters(metertypeid, meternumber, constant) Values('16','2',(select constant from FreezeDay where id=2))

 

前两个字段值是自己设定的,最后一个字段值是取得其他表中对应字段的值

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-10-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案