PDF (US Ltr)
- 1.4Mb
PDF (A4)
- 1.4Mb
このページは機械翻訳したものです。
MySQL Shell が対話モードの場合、結果セットの出力にはテーブル形式がデフォルトで使用されます。 クエリーの結果は、ビューを改善して分析を支援するために書式設定されたテーブルとして表示されます。
バッチモードでの実行時にこの出力形式を取得するには、--result-format=table
コマンドラインオプション (またはそのエイリアス --table
) を使用して MySQL Shell を起動するか、MySQL Shell 構成オプション resultFormat
を table
に設定します。
例 5.1 テーブル形式での出力
Press CTRL+C to copyMySQL localhost:33060+ ssl world_x JS > shell.options.set('resultFormat','table') MySQL localhost:33060+ ssl world_x JS > session.sql("select * from city where countrycode='AUT'") +------+------------+-------------+---------------+-------------------------+ | ID | Name | CountryCode | District | Info | +------+------------+-------------+---------------+-------------------------+ | 1523 | Wien | AUT | Wien | {"Population": 1608144} | | 1524 | Graz | AUT | Steiermark | {"Population": 240967} | | 1525 | Linz | AUT | North Austria | {"Population": 188022} | | 1526 | Salzburg | AUT | Salzburg | {"Population": 144247} | | 1527 | Innsbruck | AUT | Tiroli | {"Population": 111752} | | 1528 | Klagenfurt | AUT | Kärnten | {"Population": 91141} | +------+------------+-------------+---------------+-------------------------+ 6 rows in set (0.0030 sec)