1. 复制表结构及其数据:create table table_name_new as select * from table_name_old 2. 只复制表结构:create table table_name_new as select * from table_name_old where 1=2;或者:create table table_name_new like table_name_old 3. 只复制表数据:如果两个表结构一样: insert into
The development of this side of the outsourcing project, previously built the development environment of the Oracle database, and later need to copy the development library to the test library. After a study, the steps are as follows:1. Build a test
When modifying the field in Oracle datebase in the afternoon, the system prompts "record is locked by another user". The error is conceivable.
Unlock below
1. view the lock
Select t2.username, t2.sid, t2.serial #, t2.logon _ time from V $
Since version 9.2, Oracle has designed and implemented a patch installation management tool opatch. Opatch uses a system data structure called inventory (shared with Oui strictly) to centrally manage all installed patches. The opatch command is used
I wrote a function module for sales query, but there was no error in sorting by bar code/warehouse conditions during the test, as long as you query by date there will be an error message "Ora-01791 is not a selected expression", so check my SQL
Oracle SQL optimization rules:
Use the in operator as few as possible. Basically, all in operators can be replaced by exists.
The SQL statements written in are easier to write and understand, but the SQL statements written in always have low
Database development or management personnel often need to create a large amount of test data, and tens of thousands of data records are required. If one data entry is required, it will waste a lot of time, this article describes how to quickly
Collect Oracle statistics
Optimizer statistical range:
Table statistics; -- number of rows, number of blocks, average length of rows; all_tables: num_rows, blocks, avg_row_len;Column statistics; -- the number of unique values in the column, the
Using shrink space to shrink ORACLE data segments
In Oracle, you can use alter table table_name shrink space to contract a table. There are two prerequisites for using shrink:
1. Row movement must be enabled for a table. 2. The segment space
MySQL:
Select * from table name where pid = 0 limit (current page-1) * per page), per page
ORACLE:
Select * from (
Select rownum as RN, source. * from (SQL statement) Source where rownum ) Result where rn> = (current page-1) * How much is displayed
I often encounter some exceptions in Java. SQL. sqlexception. I collected some previous documents from the Internet for future debugging!
ORA-00904: Invalid column name invalid column nameORA-00942: Table or view does not exist table or view does
Differences between ASCP and MRP
MRP
ASCP
Core objectives
Materials
Materials, production capacity, plan
Planning Procedure
Pure
Multi-thread, multi-whole
Range
Single Mode
Multi-Mode
When writing SQL statements, I often have troubles using in or exists. In terms of performance, how can I make the fastest choice? This is my reading experience. For more details, see the link at the end. If in is used, the execution process is as
Today I learned about the open-source DSpace software. The installation process is summarized as follows:1. Environment Settings1.1 download and install jdk1.6.x. Select the default installation path during installation.Generally C:/program
Oracle Database performance adjustment (strongly recommended. This article describes in detail under what circumstances the system parameters need to be adjusted, where the query statements have been tested by myself. I do not understand one
Oracle, as a large database, is widely used in financial, post and telecommunications, power, civil aviation, and other important sectors with a large data throughput and a wide spread of computer networks. For system administrators, it is
PostgreSQL, Oracle, and MySQL use data dictionaries to obtain the table structure. The schema name and table name are required.
PostgreSQL:Select a. attname, pg_catalog.format_type (A. atttypid, A. atttypmod) as data_typeFrom pg_catalog.pg_attribute,
(1) Pay attention to the following points when writing a stored procedure:1> Value assignment: =Logic equal to =2> comments a single line of code --Annotate the code block /*---*/3> string connector |4> declare variables in the variable declaration
1. Rule-Based Optimization (RBO)
When analyzing SQL statements, the optimizer follows Oracle's predefined rules and is not sensitive to Data. It uses only a small amount of information to determine the execution plan of an SQL statement, including:
1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service