Tags: int statement inserting data seq java ALC res tor rateRecently made a spring version of 3.0.4 's old project feature, the scenario is used to return the primary key ID when JdbcTemplate is inserted into the Oracle table to be associated with other tables. With Oralce can always use this method, high compatibility low. Public long Insertoragetid (final Quetinvtheadvo headvo) {
Keyholder keyholder = new generatedKeyHolder ();
Jdbctemplate.u
Tags: jdbc Oracle data primary keyTable structure:CREATE TABLE test ( ID varchar2 (+) primary key, name VARCHAR2 (32));Import Java.sql.connection;import Java.sql.preparedstatement;import Java.sql.resultset;import Java.sql.sqlexception;import java.sql.Statement; public class Test {/** * uses Statement.return_generated_keys to specify the return generated primary key */public static void Main (string[] Ar GS) {PreparedStatement PST = NULL;
There are several ways Oracle Inserts data:Inserting data isolated from multiple tables into a staging tableNumber of data rows 51895971. Traditional way: Inserting data directly into a table1 Insert intollb_basic_user_d_temp_test2 Selectt.serv_id,3 t.phone_id,4 A1.loc_imei T,5 Region_code,6 T.county_code,7 T.payment_mode_cd,8 t.plan_id,9 T.productflux,Ten T.allflux, OneT.netuse/ 1024x768 / 1024x768, A
Symptom: Oracle Insert time, Error: ORA-01861: text does not match format stringWorkaround:This error usually occurs on the time field, that is, the time format you inserted is inconsistent with the existing time format of the database, and the solution is to format the time you inserted: To_date (' # ', ' Yyyy-mm-dd hh24:mi:ss ')This ORA-01861 won't be reported when this is inserted.When using PL/SQL Devel
Label:Select User_sequence.nextval Form DualThe above attributes describe:keyproperty= "id": a property in a classOrder: Build Policy: (insert into before or after execution): default is After executionSequence in the User_sequence:oracleTo create a sequence:Create sequence User_sequenceStart with 1Increment by 1NomaxvalueMinValue 1NocycleCache 10;MyBatis (Oracle) How to use the primary key automatically pl
Label:First, create, delete database Oracle oradb11g_home-> Configuration and porting tools->database configration Assistant-> You can then create or delete the database Ii. establishing a table space Create Tablespace inspur_tablespace Logging DataFile ' D:\MyOracleBACK sql\studentdb\inspur_tablespace. dbf ' Size 50m Autoextend on Next 50m maxsize 20480m Extent management Local; Iii. creating a user and specifying a tablespace Create user username id
An Oracle Batch Insert method is compiled from the Internet to review the relevant data:
[Java] View plain copy
From: http://blog.csdn.net/yuguiyang1990/article/details/8764043
The most recent use of the NHibernate mapping type is the CLOB field when inserting data to find the number of bytes (one half-width character one byte, one full-width character two bytes) between 2000-4000 times wrong (ORA-01461: You can only insert a Long value assignment for a long column). After constantly looking for information and their own test the problem is finally resolved, below I will own experience to do a share.
Ready to
System Environm
In a RAC environment, logging into an instance can result in a GC global wait generation when the data being processed is completely unrelated to the data in the other instance's memory.
This article describes a phenomenon.
The environment is as follows:
Sql> Conn YANGTK/YANGTK
is connected.
Sql> select * from V$version;
BANNER
----------------------------------------------------------------
Oracle database10genterpriseedition Release10.2.0.4.
WPF app calls Oracle's stored procedure with error "ORA-06550: Number of arguments or wrong parameter type", such as:Repeated checks, the parameters of the stored procedure and the type of parameters are correct, feel very strange. Finally finally solved,The reason is to pass in DBNull.Value when the value of the parameter is null, such as:Summarize:In the case of a SQL Server database, the field is nullable, and when the passed-in parameter is NULL, the pass-through value can be successfully in
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.