Five Core classes or interfaces of Hibernate:(1) Configuration: Used to parse the hibernate. cfg. xml file and XXXXX. hbm. xml file, and create the SessionFactory object. The Configuration object is used to configure and start Hibernate. The
Hibernate helper class (officially recommended)
Public class HibernateUtil {
Private static final SessionFactorySessionFactory=BuildSessionFactory();
Private static SessionFactory buildSessionFactory (){
Try {
// Create the SessionFactory from
Create or replace type address as object (province varchar
(20), city varchar (20 ));
Alter trigger sys. JIS $ ROLE_TRIGGER $ compile;
Create table test (id number primary key, name char (50 ));Tablespace authorizationAlter user quota unlimited on
I. 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 to insert statements separated by semicolons and then inserted into Table B.
2.
Connect to MySQL:
Format: mysql-h host address-u user name-p User Password
1. Example 1: connect to MYSQL on the local machine
Find the installation directory of mysql. Generally, you can directly enter the mysql-uroot-p command and press enter
Each subquery of union must have the same number of columns, and the columns at the corresponding position must have the same data type. However, the column names can be different. Order by can only be used in the last subquery of union.And this
Sometimes the sameDBIDThere is a problem, for example: logic on the same machineDG.
The modification method is as follows:
Close Database
SHUTDOWN IMMEDIATE
Start the databaseMountStatus
STARTUP MOUNT
UseNidCommand, as shown
I. Pre-compiled SQL statement Processing
Precompilation interface PreparedStatement is an interface in java. SQL, which is a self-interface of Statement. Statement sends the complete SQL Statement to the database after being compiled. The
@ Echo off@ Title Oracle simple data backup tool: StartBackupDataClsEcho.Echo Oracle simple data backup toolEcho.Set nowDate = % date :~ 0, 4% % date :~ 5, 2% % date :~ 8, 2%Set/p oraHost = enter the address of the Oracle server (192.168.0.2 by
UTL_FILE.FOPEN in the UTL_FILE package provided by Oracle is responsible for opening a file.UTL_FILE.FOPEN (location in varchar2, filename in varchar2, open_mode in varchar2) return FILE_TYPE;Location is the path parameter,FILENAME is the file
When we used to display the database query results on the page, we always had to judge the null field. If it was null, it would display "". Suddenly we found this method stupid, in addition, "null" appears on the page ".
When using the Oracle
Recently, I found several random SQL queries in mysql on the Internet. I recorded the results.SELECT * FROM uchome_mtag AS a JOIN (select max (tagid) AS id FROM uchome_mtag) AS BON (a. tagid> = FLOOR (B. id * RAND () LIMIT 50I found a problem after
First, only the InnoDB Engine allows the use of foreign keys in MySQL versions available in the product environment (4.0.x and 4.1.x). Therefore, our data tables must use the InnoDB engine.
Next, we will first create the following database tables
1. [root @ host ~] $ Oracle_HOME/bin/localconfig delete [this step may not be successfully executed, but it will not be affected]
2. [root @ host ~] Rm-rf $ ORACLE_BASE/* [You can manually delete the installation directories and files in oracle]
3.
The first three paradigm of database design is that the independent table structure must have a unique primary key to identify the table data.SQL Server (duoOn the platform. Manually encode the primary key in the table and set it as an
Table: msg_content
Table: msg_contact_person
Expected results
Key Point Analysis: the difference between the result table and table 1 is that the real name of table 2 is added to the "er" field.
Implementation Method:
Step 1: Split the fields in
1. Add clusterware nodes
On an existing Node
Cluvfy stage-pre nodeadd-n node3 [-fixup [-fixupdir fixup_dir] [-verbose]
-- A BUG occurs during installation of 11.2.0.2, and shared disk detection is always unsuccessful. Therefore, check that only
SQL syntax writing is very long, and SQLPLUS is not automatically completed. If you forget the format, you can get help through the document.
SQL syntax description in the official document:1. keywords and Parameters
Square is the key word. elliptic
Regular Expression Function (10 Gb introduced)Regexp_like ('s ', 'Re', 'O ')S string or column expression to be searchedRegEx contentO parameter (optional)Idle> select ename from emp where regexp_like (ename,'s
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