Prepare the environment:
RedHat 5 system, MySQL 5.6 rpm package
First, upload mysql to the server.
1. Decompress MySql
[Root@www.bkjia.com] # tar-xvf MySQL-5.6.2_m5-1.rhel5.i386.tar
MySQL-client-5.6.2_m5-1.rhel5.i386.rpm
MySQL-devel-5.6.2_m5-1.rhel5.
Oracle connection string reported error ORA-01722: solution to invalid numbers, the following function, used to find a string similar to create or replace function f_GetUsers (key in varchar2,
P_cursor out pkg_test.myrctype)
Return number is
Count the number of employees in the Department (number of employees = number of employees in the department + number of lower-level departments)Department table: Employee table: SQL statement:
With Temp As(
SelectT1.deptidAsId, t1.supdeptid
1. query the first row of records:
Select * from table limit 1
2. query records from row n to row mSelect * from table1 limit n-1, m-n;
SELECT * FROM table LIMIT 5, 10; returns records FROM 6th rows to 15th rows
Select * from employee limit 3, 1;//
During Oracle data restoration today, we found that the restored data is incorrect and there are repeated records. Query the relevant information and learn that the user corresponding to the database should be deleted before restoration, then create
Manual database creation
1. manually create a database
1. Create a folder. (Based on the directory in/u01/app/Oracle/admin/orcl, we also created it)$ Mkdir-p/u01/app/oracle/admin/mydb/adump$ Mkdir-p/u01/app/oracle/admin/mydb/bdump$
In Oracle databases, we usually use the following methods to copy or migrate records between tables in different databases:1. The records in Table A are exported as insert statements separated by semicolons, and then inserted into Table B.2. create
When I was installing OracleXE for developer Demon today, there was a prompt:
Destination Folder: D: \ oraclexe \
PortFor 'Oracle Database Listener'1521
PortFor 'Oracle Services for Microsoft Transaction Server'2030
PortForHTTP Listener:
Ubuntu: After installing MongoDB and Python, how does Phython access the MongoDB database?Python is a simple programming language and the developed code is very readable.This article uses the Python driver called PyMongo driver and MongoDB to
Oracle has two optimization methods when executing SQL statements: Rule-Based RBO and cost-based CBO. The Oracle parameter optimizer_mode determines the optimization method used during SQL coaching.
Rule Based Optimizer (RBO) Based on RulesCost
Function: concatenates a column in a specified query SQL statement into a string separated by a specified character.
Deficiency: because the return value of the function is varchar2, And the commonly concatenated string is used to query SQL (because
Now let's talk about the meaning of each parameter in the Oracle execution plan.
The following is an example.
Here is a supplement.: Trace types:
Serial number
Command
Explanation
1
SET AUTOTRACE OFF
This is the
The official Oracle 10g documentation indicates that Red Hat Linux can only be installed in an operating system version earlier than rhel4. Of course, there is no problem when it is installed in rhel5, but it requires special authorization from
The Sample function is used to support data mining. The Sample function allows data analysis to be performed on the Sample data, rather than on the entire table.
Select record 10%Select * from atest sample (11)Select record 0.1%Select * from atest
CUBE and ROLLUP are new SQL keywords since Oracle8i. 9i and-11G are not new. It is an extension of the GROUP BY clause, allows you to calculate the subtotal of different levels in the SELECT statement.
CUBE is another extension of the group by
Requirement Analysis:Migrate the entire table structure, table data, and inter-Table constraints of the source database to the target instance;Delete all tables and users in the target database and recreate the users in the target database:Drop user
1. After mysql is installed, the directory distribution in linux is as follows:
Database Directory:/var/lib/mysql
Configuration File:/usr/share/mysql (mysql. server command and configuration file)
Related commands:/usr/bin (commands such as
I. Syntax:TRANSLATE (string, from_str, to_str)Ii. Purpose
Replace each character in from_str with a string after the corresponding character in to_str. TRANSLATE Is a superset of the functions provided by REPLACE. If from_str is longer than to_str,
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.