Top "Sql-insert" questions

The SQL INSERT statement allows you to insert a single or multiple rows into a table.

PHP MYSQL UPDATE if Exist or INSERT if not?

I have no idea if this is even remotely correct. I have a class where I would like to update …

php mysql sql-update sql-insert on-duplicate-key
INSERT INTO fails with node-mysql

I am trying to insert some data with node.js. I have written the following code and installed MySQL support …

mysql node.js sql-insert node-mysql
How can I insert multiple row into oracle database using one insert statement?

Possible Duplicate: Best way to do multi-row insert in Oracle? I have this insert statement INSERT INTO mytable VALUES ('val1…

sql oracle10g sql-insert
Postgres error: null value in column "id" - during insert operation

I use postgresql and yii2 framework. Well I got a very interesting error message: SQLSTATE[23502]: Not null violation: 7 ERROR: null …

sql postgresql yii null sql-insert
What are differences between INSERT and UPDATE in MySQL?

It seems INSERT and UPDATE do the same things to me. Is there any occasions where I should use INSERT …

mysql sql sql-update sql-insert
Insert into table from temporary table

I have the following table: Example: create table test ( col1 varchar(10), col2 varchar(20), col3 varchar(30) ); Now I want to insert …

sql sql-server sql-server-2008-r2 sql-insert
select into a table with different column names

In SQL, Select into ... copies rows into a different (backup) table. Is this possible if the backup table has different …

sql sqlite sql-insert
Conditional INSERT INTO statement in postgres

I'm writing a booking procedure for a mock airline booking database and what I really want to do is something …

database postgresql conditional-statements sql-insert
MySQL, how to insert null dates

I am having trouble inserting null values into date fields into a MySQL table. Here is the insert query: $query = …

php mysql date null sql-insert
Insert data in 3 tables at a time using Postgres

I want to insert data into 3 tables with a single query. My tables looks like below: CREATE TABLE sample ( id …

sql postgresql common-table-expression sql-insert sql-returning