Linked Questions

0 votes
0 answers
264 views

I'm trying to get primary keys from table 1 (patient_id) & table 2 (assessor_id), and insert them automatically into table 3. My HTML code for table 3 isn't working since it requires primary keys ...
user8786892's user avatar
0 votes
0 answers
56 views

I need to insert a number of rows(~100,000) into a table. The table has one column "Id" that is auto-incremented. LAST_INSERT_ID(); returns the last auto-incremented id of the connection session, but ...
Björn's user avatar
  • 1
0 votes
0 answers
39 views

If I run the below INSERT statement and there is an autogenerated primary key called "UserID", would it be possible to get the "UserID" of all rows that were just inserted? INSERT ...
Austin's user avatar
  • 37
25 votes
4 answers
102k views

I need to insert thousands of records in the database at one go. I am using spring JDBC template in my application. Below is the code I have written so far which executes all inserts at one go. So, ...
ajm's user avatar
  • 13.3k
26 votes
1 answer
30k views

Is there a way to simulate the OUTPUT clause in MySQL, as we have a OUTPUT clause in SQL Server. Here is the kind of query I have UPDATE employee SET empage = 10 OUTPUT ...
Saravanan's user avatar
  • 7,864
19 votes
1 answer
10k views

Using Connector/J, I would like to do a batch insert into a master table followed by a batch insert into a details table (PreparedStatement.executeBatch() for both). I haven't found much information ...
ykaganovich's user avatar
  • 15.1k
10 votes
4 answers
8k views

I am trying to insert a lot of users into a MySQL database with two tables: The first table contains the user data. An example INSERT looks like this (id is the primary key, mail is a unique key): ...
Horen's user avatar
  • 11.4k
4 votes
6 answers
5k views

INSERT INTO details (idactivity,user,hours,val,date) VALUES ('981','133','0','10500','2008-07-01'),('981','184','0','2750','2008-07-01'),('981','184','0','2750','2008-07-01') (iddetails as details ...
egidiocs's user avatar
  • 2,857
6 votes
2 answers
6k views

Ok. So the short of it is, I was trying to do an INSERT SELECT such as: START TRANSACTION; INSERT INTO dbNEW.entity (commonName, surname) SELECT namefirst, namelast FROM dbOLD.user; SET @key =...
edl's user avatar
  • 3,224
2 votes
2 answers
4k views

The followings works, but how can I collect multiple MapSqlParameterSource and insert them all in one batch? new SimpleJdbcInsert(ds).withTableName(TABLENAME); MapSqlParameterSource entry = new ...
membersound's user avatar
  • 87.9k
-2 votes
2 answers
2k views

Given MySQL tables something like this1: alpha ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , beta_id INT NULL , type_info INT NOT NULL , CONSTRAINT fk_alpha_beta FOREIGN KEY (beta_id) REFERENCES ...
khelwood's user avatar
  • 59.7k
5 votes
0 answers
2k views

I'm currently migrating an old PHP project to Node.js and are now struggeling with the mysqljs/mysql module. I have to execute a bulk insert - so far so good, it works great. But I also need all ...
Morph's user avatar
  • 173
-2 votes
2 answers
1k views

I'm working on a symfony application, and i need to insert multiple raws at once, Doctrine ORM is not a good option because for each raw it will open a connection to execute the query, to avoid this ...
ZeSoft's user avatar
  • 335
2 votes
0 answers
1k views

This is a problem in a distribute environment!!! I have processes in many distribute computers, in every process I use pymysql to insert many rows into a table with autoincrease id, I wish I could ...
Tarjintor's user avatar
  • 645
0 votes
1 answer
758 views

Now,do nothing when "on duplicate key update". So, INSERT IGNORE INTO t1 c1 VALUES(...,...,...); The last_insert_id is only one id at most. Then how to detect multi inserted ids on "insert ignore" ...
user3569065's user avatar

15 30 50 per page