The following articles mainly describe the practical application experience of Oracle query statements. If you are interested in the actual application of Oracle query statements, you can click the following articles to view them. I hope it will help you in this regard.
1. select * from table_name where rownum> begin and rownum <end
2. SQL = "select * from table"
- con.prepareCall("SELECT * FROM(SELECT A.*, rownum r FROM("+sql+") A WHERE rownum <=
- "+intPage*intPageSize+") B WHERE r > "+(intPage-1)
- *intPageSize);
Today, I want to query all the table names under the OOracle database or all the tables under a user. I haven't thought about it for a long time. I still found the answer online.
- select table_name from all_tables;
All
- select table_name from user_all_tables;
All tables of a user in an Oracle query statement
The following is a post on the SQL statement.
Select * from user_objects; // query all tables
Select * from dba_tables; // query all tables
Select * from all_tables; // query all tables
Select * from user_users // find a user
Select * from all_users // query all users
Select * from dba_users // query all users
Select name, dbid from v $ database; // query the database name and its ID
Select * from sys. user_tab_columns; // query the table name and display the column name.
Describe table name // query the table structure
Select * from sys. user_tab_columns where table_name = table name
Queries the fields of a specified table name.
2: query database Parameters
- show parameter db;
3: The instance name of the database queried by the Oracle query statement.
- select instance_name from v$instance;
4: Database Domain Name
After the database is installed, you can use
- select value from v$parameter where name='db_domain'
- show parameter domain
5: Database Service name
If the database has a domain name, the Database Service name is the global database name. If no domain name is defined for the database, the Database Service name is the same as the database name.
- show parameter service_name
6: display the current user
- show user
7: Direct Login
- sqlplus "/as sysdba"
8: Current OOracle system time
- select sysdate from dual;
9: query the database dictionary v $ nls_parameter to view character set parameters
- select * from v$nls_parameters;
The above content is an introduction to the Oracle query statement book. I hope you will have some gains.