tags: Oracle
Query data block size
select name,value from v$parameter where name='db_block_size'
Using SQL Plus, the result is only a number

Using Navicat, the result is normal


The reason why the SQL Plus result is abnormal is
A semicolon is required at the end of the statement in SQL Plus, as shown below

Query whether a table exists:select count(*) from user_tables where table_name = 'TABLE_NAME'; If return1Then there,TABLE_NAMEAll uppercase SQL (Structured Query Language) is mainly used to store data...
Subquery Nested select statements in SQL statements become sub-queries, that is, queries nested in other queries Use subquery to filter (select nested in where) The orders are stored in two tables. Ea...
Combined query Most queries in SQL only contain a single select statement retrieved from one table or multiple tables If you want to execute multiple select statements and return the results in the fo...
SQL advanced query:Function query, Group query, Multi-table query, Subquery One, function query 1.1 Aggregate function Calculate a set of values and get a return value SUM(), sum AVG(), average MIN(...
Sort query grammar select query list from table (Where filter condition) order by sorted list (desc (sort from high to low)/asc (sort from low to high)) if not written, the default is ascending (asc) ...
Syntax of group query select group function, column (required to appear after group by) from table [Where filter conditions] group by grouped list [Order by clause] note: The query list must be specia...
First, modify the column title name and alignment First look at the usage format of the column: You can use the column column name heading new column name, for example: Note: column only changes the d...
Sql optimization principle: a. Try to use column name query b.where parsing order is from right to left NULL value considerations a.NULL is not NULL (empty) b. The arithmetic expression with NULL is N...
Practice a query...
First, the relational query basis 1. Meaning: Sometimes the data required to rely on a plurality of tables, this time may need to operate in a plurality of tables in two or more tables, can give the d...