这段 sql 脚本是什么意思啊 说详细点 还有那个t1 t2 是什么意思啊? 20
ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[v_data]')andOBJECTPROPER...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v_data]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[v_data]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.v_data
AS
SELECT t1.SiteNo,t2.UserName, t1.Absence, t1.DifPress * 1.0 / 1000 as DifPress, t1.Press * 1.0 / 1000 as Press, t1.Tempe, t1.InsQuant * 1.0 / 1000 as InsQuant,
t1.SumQuant * 1.0 / 1000 as SumQuant, t1.InsHeat * 1.0 / 1000 as InsHeat, t1.SumHeat* 1.0 / 1000 as SumHeat, t1.GasTime, t1.EleTime, t1.RecordTime
FROM dbo.realtime t1 INNER JOIN
dbo.userinfo t2 ON t1.SiteNo = t2.SiteNo
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO 展开
drop view [dbo].[v_data]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.v_data
AS
SELECT t1.SiteNo,t2.UserName, t1.Absence, t1.DifPress * 1.0 / 1000 as DifPress, t1.Press * 1.0 / 1000 as Press, t1.Tempe, t1.InsQuant * 1.0 / 1000 as InsQuant,
t1.SumQuant * 1.0 / 1000 as SumQuant, t1.InsHeat * 1.0 / 1000 as InsHeat, t1.SumHeat* 1.0 / 1000 as SumHeat, t1.GasTime, t1.EleTime, t1.RecordTime
FROM dbo.realtime t1 INNER JOIN
dbo.userinfo t2 ON t1.SiteNo = t2.SiteNo
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |