diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index a0adb7c7bcb753beb346ee6ff4a8359fb5355015..eefb0aa8b28f75a4d57a34b176d0ecb1a1d9bb2f 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -685,7 +685,7 @@ int32_t shellHorizontalPrintResult(TAOS_RES *tres, const char *sql) { uint64_t resShowMaxNum = UINT64_MAX; - if (shell.args.commands == NULL && shell.args.file[0] == 0 && !shellIsLimitQuery(sql) && !shellIsShowQuery(sql)) { + if (shell.args.commands == NULL && shell.args.file[0] == 0 && !shellIsLimitQuery(sql)) { resShowMaxNum = SHELL_DEFAULT_RES_SHOW_NUM; } @@ -706,8 +706,12 @@ int32_t shellHorizontalPrintResult(TAOS_RES *tres, const char *sql) { } else if (showMore) { printf("\r\n"); printf(" Notice: The result shows only the first %d rows.\r\n", SHELL_DEFAULT_RES_SHOW_NUM); - printf(" You can use the `LIMIT` clause to get fewer result to show.\r\n"); - printf(" Or use '>>' to redirect the whole set of the result to a specified file.\r\n"); + if (shellIsShowQuery(sql)) { + printf(" You can use '>>' to redirect the whole set of the result to a specified file.\r\n"); + } else { + printf(" You can use the `LIMIT` clause to get fewer result to show.\r\n"); + printf(" Or use '>>' to redirect the whole set of the result to a specified file.\r\n"); + } printf("\r\n"); printf(" You can use Ctrl+C to stop the underway fetching.\r\n"); printf("\r\n");