SELECT formmain_5991.field0001 AS 项目名称, formmain_5991.field0002 AS 项目编号, formmain_5991.field0003 AS 计划开始, ISNULL(formmain_5991.field0004, ISNULL(formmain_0478.field0051, GETDATE())) AS 计划结束时间, formmain_5991.field0005 AS 节点名称, formmain_5991.field0009 AS 节点计划时间, formmain_5991.field0006 AS 节点编号, ISNULL(formmain_0478.field0051, GETDATE()) AS 结束时间, formmain_5991.field0010 AS 类型 FROM formmain_5991 INNER JOIN formmain_0478 ON formmain_5991.field0002 = formmain_0478.field0138 ORDER BY 节点编号
1、ISNULL 判断为空
2、getdate() 获取当前时间
3、 table1 inner join table2 on table1.t1 = table2.t1