Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回消息创建时间。
TIMESTAMP 形式的消息创建时间。
Timestamp 标头字段包含消息的创建时间。时间为协调通用时间 (UTC)。它不是消息实际传输的时间,因为事务或其它客户端消息排队可能导致实际发送推迟。
可以在收到消息后以及发生回退或提交之前读取此标头;之后则无法读取。
在下面的示例中,收到一条消息,并将消息创建时间输出到数据库服务器消息窗口:
begin declare @msgid varchar(128); declare @ts timestamp; set @msgid = ml_qa_getmessage( 'myaddress' ); set @ts = ml_qa_gettimestamp( @msgid ); message 'message received with create time: ' || @ts ; commit; end