结果显示可以小改一下就可以:my_query(&my_connection,"select * from msgex") >>D://test.txt
2、第一步不可行的话,你先进入到mysql里面,在里面实行select * from msgex >>D://test.txt
上面是我简单的将显示方法给你的。你到D盘下找test.txt查看一下就知道了,可行的话就采纳吧,手有点累了。
mssql 的解释:set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [dbo].[sitedata_ins2]
ON [dbo].[SiteData] FOR INSERT -- 当[SiteData]表新增记录触发以下 *** 作
AS
declare @recordtime as datetime
select @recordtime=recordtime from inserted -- ‘inserted’ 是指新增的记录信息(SiteData表),
if not exists(select recordtime from sitedata2Center1 where recordtime=@recordtime) --在sitedata2Center1表中查询是否存在相应的recordtime的记录
insert into sitedata2Center1 (recordtime) values(@recordtime) --如果没有相应记录就在sitedata2Center1表新增一条记录
--------------------------------------------
以下为你要的mysql的触发器的sql语句:
mysql>delimiter //
->create trigger sitedata_ins2
->before insert on SiteData
->for each row
->Begin
->If not exists(select 1 from sitedata2Center1 where recordtime=new.recordtime) then
->insert into sitedata2Center1(recordtime) values(new.recordtime)
->END IF
->end//
->delimiter
Query OK, 0 rows affected (0.05 sec)
(祝你好运...)
如果对您有帮助,请记得采纳为满意答案,谢谢!祝您生活愉快!
vaela
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)