insert-into Questions
2
Solved
I try to do a table data dump using pg_dump, something like this:
pg96\bin\pg_dump ... --format plain --section data --column-inserts --file obj.account.backup --table obj.account database_xyz
I...
Davidadavidde asked 11/6, 2017 at 8:57
12
Could someone tell me how to add a new line in a text that I enter in a MySql table?
I tried using the '\n' in the line I entered with INSERT INTO statement but '\n' is shown as it is.
Actually I...
Conformable asked 25/5, 2010 at 7:50
9
Solved
I'm trying to populate a temp table based on the result of a condition in SQL 2005. The temp table will have the same structure either way, but will be populated using a different query depending o...
Becharm asked 11/11, 2010 at 15:23
3
I believe there's an SELECT INTO-like syntax in Snowflake, but I am unable to find documentation or examples to use it.
CREATE TABLE raw_data (
Timestamp TIMESTAMP NOT NULL,
Date DATE NOT NULL,...
Asylum asked 8/11, 2015 at 21:26
4
I'm trying to create a new table using an existing table already using:
INSERT INTO NewTable (...,...)
SELECT * from SampleTable
What I need to is add a record number at the beginning or the en...
Kolodgie asked 24/10, 2012 at 20:40
7
Solved
MySQL How do you INSERT INTO a table with a SELECT subquery returning multiple rows?
INSERT INTO Results
(
People,
names,
)
VALUES
(
(
SELECT d.id
FROM Names f
JOIN People d ON d.id = f...
Foliole asked 23/2, 2012 at 22:37
1
Solved
I have a requirement in which I need to get one column from another table and insert that column data with some other data into another table.
Example:
If the cust_id='11' then I need to get the ...
Polyester asked 16/5, 2018 at 7:36
4
Solved
I created a database with one table in MySQL:
CREATE DATABASE iac_enrollment_system;
USE iac_enrollment_system;
CREATE TABLE course(
course_code CHAR(7),
course_desc VARCHAR(255) NOT NULL,
co...
Apennines asked 16/8, 2013 at 9:44
5
Solved
As the title says, I am trying to insert into one table selecting values from another table and some default values.
INSERT INTO def (catid, title, page, publish)
(SELECT catid, title from...
Screw asked 6/5, 2011 at 5:36
3
I'm trying to store a query result in a temporary table for further processing.
create temporary table tmpTest
(
a FLOAT,
b FLOAT,
c FLOAT
)
engine = memory;
insert into tmpTest
(
select a,b,...
Frond asked 9/10, 2013 at 10:12
4
Solved
I'm trying to move old data from:
this_table >> this_table_archive
copying all columns over. I've tried this, but it doesn't work:
INSERT INTO this_table_archive (*) VALUES (SELECT * FROM...
Plater asked 9/3, 2011 at 22:54
2
I created a new migration, where is mentioned
...
t.timestamps
in the created table are added these two columns
...
| created_at | datetime | NO (Null) | | NULL (Default) |
| updated_at | date...
Diplocardiac asked 24/4, 2013 at 18:38
5
Solved
I have two tables with the same column definitions. I need to move (not copy) a row from one table to another. Before I go off and use INSERT INTO/DELETE (in a transaction), is there a smarter way?...
Trilbie asked 13/5, 2010 at 19:11
3
Solved
Not being experienced with SQL, I was hoping someone could help me with this.
I have a empty temp table, as well as a table with information in it.
My outline of my query as it stands is as follo...
Extensor asked 18/6, 2015 at 9:8
3
Solved
I want run an INSERT INTO table SELECT... FROM...
The problem is that the table that I am inserting to has 5 columns, whereas the table I am selecting from has only 4. The 5th column needs to be se...
Sides asked 2/4, 2015 at 19:38
1
This is what I have for the Add Event.
CurrentDb.Execute "INSERT INTO tblMatchBook ([Patron], [Staff], [TimeReceived], [SurveyLink], [DateFinished], [BookTitles]) " & _
" Values('" & Me.dd...
Eighteenmo asked 25/7, 2013 at 17:57
0
I am trying to allow my Rails App some advanced functionality in way of creating relationships. I am running MySQL as the back-end. The query below runs just fine in PHPMyAdmin, but upon attempted ...
Dulcedulcea asked 23/12, 2014 at 18:41
2
Solved
I'm trying to INSERT INTO a table, and I know 2 ways:
Adding rows as values:
INSERT INTO db_example.tab_example (id,name,surname,group)
VALUES ('','Tom','Hanks','1');
or from another table:
IN...
Pleiad asked 16/6, 2014 at 13:11
3
Solved
How to enforce a constraint of foreign key on columns of same table in SQL while entering values in the following table:
employee:
empid number,
manager number (must be an existing employee)
...
Indign asked 7/1, 2012 at 7:29
3
Solved
I created a table in my database:
CREATE TABLE official_receipt(
student_no INT UNSIGNED,
academic_year CHAR(8),
trimester ENUM('1', '2', '3'),
or_no MEDIUMINT UNSIGNED,
issue_date DATE NOT N...
Gautier asked 22/7, 2013 at 17:40
2
I need to find a way to do an INSERT INTO table A but one of the values is something that comes from a lookup on table B, allow me to illustrate.
I have the 2 following tables:
Table A:
A1: Stri...
Lanate asked 21/4, 2010 at 16:20
3
Solved
I'm trying to insert values into an 'Employee' table in Oracle SQL. I have a question regarding inputting values determined by a foreign key:
My employees have 3 attributes that are determined by ...
Nyasaland asked 2/5, 2012 at 21:30
3
Solved
My tests seem to confirm that
INSERT INTO a (x, y) SELECT y, x FROM b
maps b.y to a.x, i.e., the fields are matched only by ordinal position and not by name. Is this always the case, i.e., can I...
Facula asked 21/3, 2012 at 15:30
1
© 2022 - 2024 — McMap. All rights reserved.