sql-insert Questions
6
Solved
I have a question while working with Drizzle ORM and MySQL.
Currently, Drizzle ORM does not provide insert returning function for MySQL.
Check this link.
My website adds users to the database and i...
Karrah asked 21/7, 2023 at 10:5
3
I would like to know how to insert data in postgresql using for loop?
I want to insert 1 to 1000 in row of id..
Fefeal asked 14/12, 2016 at 1:54
1
I have this class:
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "SECURITY_AUTHORITIES")
public class SecurityAuthority implements GrantedAuthority {
@Serial
private sta...
Existential asked 30/3, 2024 at 6:39
5
Solved
I am trying to insert data into an existing table and keep receiving an error.
INSERT INTO Patient
(
PatientNo,
PatientFirstName,
PatientLastName,
PatientStreetAddress,
PatientTown,
Patient...
Tanh asked 20/3, 2014 at 19:11
3
Solved
I've just stumbled on a very weird behaviour:
Imagine we have a table customers:
MariaDB [connections]> describe customers;
+--------------+-------------+------+-----+---------+---------------...
Gonick asked 17/9, 2013 at 11:5
12
Solved
I started by googling and found the article How to write INSERT if NOT EXISTS queries in standard SQL which talks about mutex tables.
I have a table with ~14 million records. If I want to add more ...
Stadiometer asked 1/9, 2009 at 8:56
7
Solved
I'm looking for a way to get all rows as INSERT statements from one specific table within a database using pg_dump in PostgreSQL.
E.g., I have table A and all rows in table A I need as INSERT stat...
Botel asked 18/5, 2010 at 14:8
2
Solved
INSERT INTO user_data.user_data (username,randomint)
VALUES ('mahman',1);
ERROR: array value must start with "{" or dimension information
LINE 1: ... user_data.user_data (username,rando...
Otorhinolaryngology asked 20/7, 2015 at 14:25
14
Solved
I want to insert data into my table, but insert only data that doesn't already exist in my database.
Here is my code:
ALTER PROCEDURE [dbo].[EmailsRecebidosInsert]
(@_DE nvarchar(50),
@_ASSUNTO...
Renown asked 7/1, 2014 at 12:30
3
I have created a table name viewex:
CREATE TABLE viewex (
sno INTEGER,
name VARCHAR(30),
email VARCHAR(30),
address VARCHAR(50),
contact VARCHAR(30)
);
Inserted data to the table.
Now I am in...
Cajeput asked 6/9, 2011 at 7:12
3
Solved
I make a query with INNER JOIN and the result was 12 millions lines.
I like to put this in a table.
I did some tests and when I created the table using clause AS SELECT was more faster than, create...
Fiorenza asked 19/7, 2018 at 22:9
5
Solved
I have an SQLite database. I am trying to insert values (users_id, lessoninfo_id) in table bookmarks, only if both do not exist before in a row.
INSERT INTO bookmarks(users_id,lessoninfo_id)
VALU...
Ormuz asked 12/10, 2013 at 17:19
14
I created this table called LOCATION
by doing this:
CREATE TABLE LOCATION(
POSTCODE VARCHAR(10) PRIMARY KEY,
STREET_NAME VARCHAR(20),
CITY VARCHAR(20));
and when I try to add some date within t...
Sun asked 8/5, 2012 at 15:18
3
Solved
Need to insert null value to field with uuid type without NOT NULL specification (not primary key).
When I try insert '', this return:
ERROR: invalid input syntax for uuid: ""
When I try insert...
Dumpish asked 18/11, 2014 at 11:7
2
Solved
I faced an issue with SQLite (version 3.7.13 if matters).
I created a new table with two columns foo and bar, data type is undefined. When I try to insert numbers, it works fine. But when I insert ...
Rillet asked 22/2, 2014 at 18:47
6
I have a SQL like this:
INSERT INTO table1 (column1, column2) (
SELECT column3, column4 FROM table2 WHERE column5 = 'value'
);
The table1 has 3,500,000 rows.
The table2 has 900,000 rows.
SELECT ...
Herzberg asked 7/6, 2021 at 23:34
7
Solved
I am trying to insert a data into a table. After executing the query i am getting an exception stating
org.postgresql.util.PSQLException: No results were returned by the query.
org.postgresql.jdbc...
Incriminate asked 22/1, 2014 at 6:48
21
I'm using Python to write to a postgres database:
sql_string = "INSERT INTO hundred (name,name_slug,status) VALUES ("
sql_string += hundred + ", '" + hundred_slug + "', " + status + ");"
cursor.ex...
Zeb asked 1/11, 2010 at 14:24
6
I've lots of string values containing single quotes which I need to insert to a column in REDSHIFT table.
I used both /' and '' to escape the single quote in INSERT statement.
e.g.
INSERT INTO...
Bloodshed asked 28/12, 2017 at 0:50
2
I created a view called "view_employee" like this:
CREATE VIEW view_employee AS
SELECT employee.surname || ', ' || employee.name AS comp_name, employee.sex, sections.name AS section_name, employee...
Translucent asked 22/11, 2017 at 18:38
7
Solved
I have a table that I am trying to update multiple values at once. Here is the table schema:
Column | Type | Modifiers
---------------+---------+-----------
user_id | integer |
subservice_id ...
Druse asked 28/12, 2013 at 13:20
4
Solved
I'm writing my graduate work about methods of importing data from a file to SQL Server table.
I have created my own program and now I'm comparing it with some standard methods such as
bcp
BULK INS...
Duong asked 18/5, 2017 at 7:20
3
Solved
I created a query in which I insert to a empty table the result of a select from other table.
This select itself takes ~20 minutes (30 M Rows, 120 Columns and "Where" conditions, and it's fine), b...
Messalina asked 14/12, 2016 at 8:28
13
Solved
What is the correct SQL syntax to insert a value with an apostrophe in it?
Insert into Person
(First, Last)
Values
'Joe',
'O'Brien'
I keep getting an error as I think the apostrophe after the...
Unmerciful asked 16/12, 2009 at 3:34
11
Solved
I need to programmatically insert tens of millions of records into a Postgres database. Presently, I'm executing thousands of insert statements in a single query.
Is there a better way to do ...
Barghest asked 17/4, 2009 at 3:50
1 Next >
© 2022 - 2025 — McMap. All rights reserved.