你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

print operator

Applies to: ✅Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

输出单行,将一个或多个标量表达式结果作为列。

Syntax

print [ColumnName=] ScalarExpression [, ...]

Learn more about syntax conventions.

Parameters

Name 类型 Required Description
ColumnName string 要分配给输出列的名称。
ScalarExpression string ✔️ 要计算的表达式。

Returns

具有一列或多列以及单行的表。 Each column returns the corresponding value of the evaluated ScalarExpression.

Examples

本节中的示例演示如何使用语法帮助你入门。

The examples in this article use publicly available tables in the help cluster, such as the StormEvents table in the Samples database.

The examples in this article use publicly available tables, such as the Weather table in the Weather analytics sample gallery. 可能需要修改示例查询中的表名称以匹配工作区中的表。

以下示例输出包含两列的行。 一列包含一系列数字的总和,另一列包含变量的值,x

print 0 + 1 + 2 + 3 + 4 + 5, x = "Wow!"

Output

print_0 x
15 Wow!

以下示例将 strcat() 函数的结果输出为串联字符串。

print banner=strcat("Hello", ", ", "World!")

Output

banner
Hello, World!