Question: Ask hint to do the spellingI have a SQL add as follows hint, the purpose is to specify Hash_join mode. Select/*+ordered Use_hash (a,b,c,d) *From A,b,c,dWhere ... whichA relates only to B, B relates only to C, B relates only to C, and C relates only to D,Order of magnitude: a:1000, b:100 million, C: 8 million, d:100 million The execution plan is:Hash Join---Hash Join-----Hash Join------A-----b-----C---d Given the small size of the D table, can I do it as a driver table, and a,b,c the r
.
1. declare continue handler example CONTINUE processing example
Create table t4 (s1 int, primary key (s1 ));//
Create procedure p23 ()
BEGIN
DECLARE CONTINUE HANDLER
For sqlstate '200' SET @ x2 = 1;
SET @ x = 1;
Insert into t4 VALUES (1 );
SET @ x = 2;
Insert into t4 VALUES (1 );
SET @ x = 3;
END ;//
This is an example of CONTINUE processing in MySQL
. However, no error message is returned because the error processing is included in the process. Nothing is added to table t3, but some information is recorded in table error_log, which tells us that the INSERT into table t3 action fails.
Declare handler syntax statement syntax for exception handling
DECLARE
{EXIT | CONTINUE}
HANDLER
{Error-number | {SQLSTATE error-string} | condition}
SQL statement
The above is the usage of error handling, that is, a piece of code automatically trigger
not appear in the primary key table. But no error message.Returns because error handling is already contained in the procedure. Nothing is added to the T3 table, but the Error_log table recordsWith some information, this tells us that the INSERT into table T3 action failed.
Syntax for DECLARE HANDLER syntax declaring exception handling
DECLARE{EXIT | CONTINUE}HANDLER for{Error-number | {SQLSTATE error-string} | Condition}SQL statement
The above is the usage of error handling, which is a piece o
thedestination file or when
Destination file is missing
-V, -- verbose explain what isbeing done
-X, -- one-file-system stay on thisfile system
-Z, -- context = CONTEXT set securitycontext of copy to CONTEXT
-- Help: displays the help information and exits.
-- Version: displays the version information and exits.Example 5: copy a single file to the directory. The object does not exist.
[Bzfys @ Nagiost1] $ tree
.
── T2
── T3
│ ?? ── T2
── T4[Bzfys @ N
overload a function, execute
Test t3 = t1 + t2; // call: Test t3 = operator + (t1, t2 );
When set as a member operator to overload a function, execute
Test t3 = t1 + t2; // call: Test t3 = t1.operator + (t2); // this pointer is used to replace the number t1 on the left.
Preliminary Test
1. NextGlobal operator overload FunctionExample:
# Include "stdio. h "class Test {int x; int y; public: Test (int x = 0, int y = 0) {this-> x = x; this-> y = y;} int getx () {return x;} int gety () {return y;}
Before writing, we will look at a few questions, if you have a good understanding of these issues, it can not read this article, if you do not understand, then you can look at my thoughts.Question 1:
public static void main(String[] args){ String t1 = new String("1"); t1.intern(); String t2 = "1"; System.out.println(t1 == t2); String t3 = new String("2") + new String("2"); t3.intern(); String t4 = "22"; System.out.println(t3 ==
value of the direct storage variables stored in the stack, can be efficiently accessed, packaging the type needs to point to the instance by reference, and the specific instance is saved in the heap. 4.4 The initial value of the wrapper type is different, and the initial value of the base type depends on the specific type. 4.5 Different ways of using, such as when working with the collection class can only use the wrapper type.Comparison of integer and int dataIn Java, there is no difference b
Non-recursive source code:
. Dataarray :. space 1024 # Open up the array space input_number_msg :. asciiz "Please input number of integers:" input_integer_msg :. asciiz "Please input Integers to be sorted:" output_integer_msg :. asciiz "the sorted integers are :". textmain: la $ A0, input_number_msg # prompt to enter the number of Integers to be sorted li $ v0, 4 syscall li $ v0, 5 syscall la $ T6, array move $ T7, $ zero # initialize T7 for cyclic counting move $ T8, $ V0 # T8 for storing the n
NMAP provides four basic functions (host discovery, port scanning, service and version detection, OS detection) and a rich scripting library. Nmap can be used for simple network information scanning, but also in high-level, complex, specific environment: such as scanning a large number of hosts on the Internet, bypassing the firewall/ids/ips, scanning web sites, scanning routers and so on.Briefly review Nmap simple scanning method:Full Scan: nmap-t4-a
= ' 1001 '); 12, inquiry at least to learn the number of "001" Students all the other students of the class number and name; Select DISTINCT t2.sid,t1.sname from t_student T1, T_score T2 where T1.sid = T2.sid and CID in (the Select CID from t_score where sid = ' 001 '); 13, the "T_score" table "cotyledons" teacher teaching the results of the course are changed to the average performance of the curriculum; Update T_score t4 Set grade = (select AVG (t3
General Idea:MySQL does not have a convenient statistical function like Oracle, can only rely on their own hard computing: through the Time field directly increase the year, the month, and then through the left join associated Time field to calculate the chain, year-over formula can beOriginal table structure:Find sql:[SQL]View PlainCopyPrint?
--by year
SELECT t5.*, Case when t5.last_energy_year is NULL OR t5.last_energy_year =0 Then 0.00
ELSE FORMAT (((t5.energy_year-t5.last
action fails.Declare handler syntax statement syntax for Exception HandlingDECLARE{EXIT | CONTINUE}HANDLER{Error-number | {SQLSTATE error-string} | condition}SQL statementThe above is the usage of error handling, that is, a piece of code automatically triggered when a program fails. MySQL allows two processors, one of which is EXIT processing, which we just used. The other is what we will demonstrate. The CONTINUE processing is similar to the EXIT processing. The difference is that after it is
the EXIT processing. The difference is that after it is executed, the original main program continues to run, so this composite statement has no EXIT.1. declare continue handler example CONTINUE processing exampleCreate table t4 (s1 int, primary key (s1 ));//Create procedure p23 ()BEGINDECLARE CONTINUE HANDLERFor sqlstate '200' SET @ x2 = 1;SET @ x = 1;Insert into t4 VALUES (1 );SET @ x = 2;Insert into
Oracle where exists 2, oraclewhereexistsWhere exists 2
I have explained the basic usage of select according to my personal understanding. Of course, exists is not only after select. For example, you can use where exists for update.
Continue with the previous explanation. I can see it on the Internet. Where exists and In are different In efficiency. Let's test and compare how they are different.
First create a test table t4
Create table
CRM: Customer Relationship Management SystemThe overall framework MVC4 + EF5 + AUTOFAC replaces the relationship between the various layers of the factory layer connectionBasic framework01 Entity layer 02 Warehousing layer 03 Business Layer 04 Common layer 05UI MVC framework------------------------------------------01 Entity Layer EF01 in the physical layer for easy model annotationGenerate some classes of EF entity classes and labeled classes using the T4
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.