Use of JDBC in JAVA
JDBC(Java Data
Base Connectivity,Javadata base Connection) is a Java for executing SQL statements
API, which provides unified access to multiple relational databases, is used by a set of Java Language Written class and interface composition. JDBC provides a benchmark against which more advanced tools and interfaces can be built to enable ...
Added by Mr.Fab on Mon, 15 Jul 2019 21:19:24 +0300
Use of T-SQL Cursors
Cursors are similar to loop operations in java.
1. Define a cursor
A cursor can actually be understood as a pointer defined on a particular data set. We can control this pointer to traverse the data set or simply point to a specific row, so the cursor is defined on a data set that starts with Select:
The cursor definitions in T-SQL ar ...
Added by g5604 on Mon, 15 Jul 2019 01:11:13 +0300
PostgreSQL escape, UNICODE, and SQL injection
Label
PostgreSQL, json, string escape, unicode, SQL injection, backslash_quote, escape_string_warning, standard_conforming_strings
background
Through this article, you can understand:
1. How to input special characters in a string, such as carriage return.
2. How to enter single quotation marks in a string.
3. What is an escape character? Us ...
Added by primefalcon on Sun, 14 Jul 2019 00:59:38 +0300
Oracle Query Optimization-04 Insert, Update and Delete Data
4.1 Insert new records
problem
Insert a new record into the table.
Solution
Insert a line using an insert statement with a values clause.
insert into dept(deptno,dname,loc)
values(19,'xgj','BEIJING');
discuss
As a simple way, you can omit the list of fields in insert statements.
However, if the statement does not list the targe ...
Added by rob323 on Sat, 13 Jul 2019 22:39:57 +0300
DBCP and CP30 Connection Pool Components
I. Overview
Usually, when operating a database, users want to request a connection from the database, and it usually takes a relatively large amount of resources and a long time to create a connection. If a website has millions of visits per day, the database server needs to create millions of connections. This is extremely important for datab ...
Added by huszi001 on Fri, 12 Jul 2019 03:24:50 +0300
An overview of the more useful jar packages for Java Web
(Import the driver jar package for this database before connecting to it, for example MySQL is mysql-connector-java-5.1.46.jar)
About the database connection pool c3p0 jar package that connects to the database:
c3p0-0.9.5-pre1.jar dependent mchange-commons-java-0.2.4.jar itcast-tools-1.4.jar (where a JdbcUtils tool class is used to connect)
...
Added by iffo on Thu, 11 Jul 2019 19:58:42 +0300
Analysis of merge into usage in oracle
In the form of merge into:
MERGE INTO [target-table] A USING [source-table sql] B ON([conditional expression] and [...]...)
WHEN MATCHED THEN
[UPDATE sql]
WHEN NOT MATCHED THEN
[INSERT sql]Function: To judge whether table B and table A meet the conditions of ON, if they are satisfied, update table A with table B, if not, insert table B data ...
Added by beachdaze on Thu, 11 Jul 2019 02:59:08 +0300
Analysis of MyBatis Dynamic SQL Bottom Principle
When we use mybatis, we write sql statements in xml.
For example, this dynamic sql code:
<update id="update" parameterType="org.format.dynamicproxy.mybatis.bean.User">
UPDATE users
<trim prefix="SET" prefixOverrides=",">
<if test="name != null and name != ''">
name = #{name}
</if> ...
Added by studgate on Thu, 11 Jul 2019 02:29:47 +0300
Exploration and Summary of Missing Indexes for Foreign Keys in ORACLE
In an ORACLE database, when a foreign key constraint is defined, ORACLE does not automatically create the corresponding index; it must manually create the index on the columns associated with the foreign key constraint.Is it necessary to create an index on a foreign key field?If necessary, when patrolling, how can I find out the related tables ...
Added by PHP Man on Mon, 08 Jul 2019 19:07:27 +0300
Nine Forms of Select Query for LINQ to SQL Statements
Catalog
Explain
simple form
Anonymous type form
Conditional form
Specified type form
Screening Forms
Shaped form
Nested form
Local invocation method form
Distinct Form
Explain
The query expression select is placed at the end of the expression, which is similar to the function of select in the SQL command but different in locatio ...
Added by Andre_Ng on Mon, 08 Jul 2019 06:55:25 +0300