SQL statement multi-table query, SQL constraints, DDL, DML
1 SQL statement multi-table query
For example, query employees (employee table) and departments (department table) information according to department_id.
Mode 1 (Universal): SELECT... FROM... WHERE
SELECT e.last_name,e.department_id,d.department_name
FROM employees e,departments d
where e.department_id = d.department_id
...
Posted by sincejan63 on Fri, 24 May 2019 14:08:32 -0700
Oracle execution plan explanation (1)
Understanding Oracle's execution plan is the first step in optimizing, so let's start with the example below.
Additional information below
1. Create test tables
[sql] view plaincopy
SQL> create table t as select 1 id,object_name from dba_objects;
Table created
SQL> update t set id=99 where rownum=1;
1 ...
Posted by wpt394 on Fri, 24 May 2019 10:10:29 -0700
Server Development Series 2
title: Server Development Series 2
date: 2017-9-13 11:27:46
After three weeks of crazy overtime, the pace of server development can finally be put on hold, and there is time to take a good look at the project from an "external" perspective.
Write tcp server naked using swoole
In the absence of the Swiss Army Knife (familiar framework) ...
Posted by FireDrake on Thu, 23 May 2019 16:57:22 -0700
Loadrunner 11 uses Java protocol to operate oracle Database
Tool preparation
JDK
Since it is a Java protocol, JDK is essential, but the largest version of JDK supported by lr11 is only jdk1.6, and it must be 32 bits.
jdbc connects jar packages
To connect to oracle database, you need to prepare the database-driven jar package and select the corresponding version of the jar package acc ...
Posted by The voice on Thu, 23 May 2019 12:57:41 -0700
Two Temporary Tables in MySQL
Change from: http://mysql.taobao.org/monthly/2016/06/07/
External Temporary Table
Through CREATE TEMPORARY TABLE
Create temporary tables, which are called external temporary tables. This temporary table is only visible to the current user and closes automatically at the end of the current session. This temporary table can be named with the ...
Posted by lucidpc on Thu, 23 May 2019 12:37:24 -0700
Execution Order of SQL Logical Query Statements
The first condition for efficient index use is to know what queries will be used in the index. This problem is related to the "Leftmost Prefix Principle" in B+Tree. Here is an example to illustrate the Leftmost Prefix Principle.
Let's start with the concept of joint indexing. In the above, we all assume that the index refers to only ...
Posted by garygay on Wed, 22 May 2019 17:26:16 -0700
The database thing (Mysql) - End
Previous review
Subquery
The missing distinct
having
where sub-query
in subquery
between and
multi-table query
Query results use multi-table data
Left join query left join on
Right join query right join on
Full join query full join on
Inner join on
Previous review
order by
select * from `group` order by max_size;
...
Posted by spectacularstuff on Wed, 22 May 2019 12:04:36 -0700
Oracle User Management
Example:
#sqlplus /nolog
SQL> conn / as sysdba;
create user username identified by password;
grant connect,resource to username;
grant select,insert,update,delete on Table name to username;
//Let this user create views
grant CREATE VIEW to username;
//Let this user create tables
grant create table to ...
Posted by syntaxerror on Tue, 21 May 2019 18:05:50 -0700
join in MySQL
I. An Overview of Join's Grammar
join is used to link fields in multiple tables. The grammar is as follows:
... FROM table1 INNER|LEFT|RIGHT JOIN table2 ON conditiona
Table 1: left table; table 2: right table.
JOIN can be roughly divided into three categories according to its functions:
INNER JOIN (inner join, or equivalent join) ...
Posted by fatfrank on Tue, 21 May 2019 17:31:14 -0700
Database Objects - Functions, Views, Synonyms, Cursors, Packages
function
Grammar for Defining Functions
Practice calculating the sum of two numbers
Adding Data to Exercise Functions
Call function of exercise function
view
Characteristics of Views
Adding and deleting views
Add view
Delete view
Synonym SYNONYM
grammar
Practice synonyms
cursor
Classification of cursors
Cursor syntax
Pr ...
Posted by whizard on Tue, 21 May 2019 16:07:03 -0700