database 如何在oracle数据库的sqlplus中列出一个表中的所有数据?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11337820/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to list all the data in a table in sqlplus in oracle database?
提问by user1439090
This might be a very basic question but I can't find the correct command for it.
这可能是一个非常基本的问题,但我找不到正确的命令。
I can list the datafields in a table using the command
我可以使用命令列出表中的数据字段
select * from cat where table_name='mytable';
How do I check the data that has been inserted in this table using sqlplus?
如何使用sqlplus检查已插入该表中的数据?
回答by akf
You can get all the data from a table by using the simple statement:
您可以使用简单的语句从表中获取所有数据:
select * from <table name>;
so if you want to get all the data from the table cat, try:
因此,如果您想从表中获取所有数据cat,请尝试:
select * from cat;
if you'd like to get all the data from mytable, try:
如果您想从 获取所有数据mytable,请尝试:
select * from mytable;
any whereclause that you define in the statement is used to filter the results that this simple 'select everything from' statement would return.
where您在语句中定义的任何子句都用于过滤这个简单的“选择所有内容”语句将返回的结果。
回答by Omer
connect to the desired user in which you want to see tables SQL QUERY: select table_name from user_tables;
连接到您想要查看其中表的所需用户 SQL QUERY: select table_name from user_tables;

