从命令行获取mysql列 [英] getting mysql column from the command line
本文介绍了从命令行获取mysql列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从cmd访问mysql,我想从一个特定的表中获取所有行,但我找不到确切的命令这样做。
I am accessing mysql from cmd, and I want to get all rows from a specific table, but I can't find the exact command to do so.
示例:
SHOW DATABSES #shows all available databases;
CONNECT TEST_DB #I connect to test_db
SHOW TABLES #shows all tables.
缺少的是如何只看到特定表中的列。
What Is missing is how to only see the columns from a specific table.
如果我执行 SELECT * FROM table_test
,它会显示所有结果, $ b
if I do SELECT * FROM table_test
it displays all results instead of just the columns
推荐答案
您可能正在寻找:
DESCRIBE table_test;
与
EXPLAIN table_test;
请参阅 MySQL - 13.8.1 DESCRIBE语法,链接到 MySQL - 13.8.1 EXPLAIN语法。
这篇关于从命令行获取mysql列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文