Top "Select-into" questions

Select multiple columns into multiple variables

How can I do in one select with multiple columns and put each column in a variable? Something like this: …

sql oracle plsql select-into
SQL Server 'select * into' versus 'insert into ..select *

Say table1 and table2 already exist, is there any difference between these queries query1 :- select * into table1 from table2 …

sql-server select-into
Preserving ORDER BY in SELECT INTO

I have a T-SQL query that takes data from one table and copies it into a new table but only …

sql-server tsql sql-order-by select-into
SELECT INTO and "Undeclared variable" error

When I try to execute following query: SELECT id_subscriber INTO newsletter_to_send FROM subscribers I get an error: #1327 …

mysql select-into
How to store selection result in to variable in Oracle procedure

I write a simple procedure. I try to store selection result in variable. I use "SELECT INTO" query but I …

oracle stored-procedures select-into
How to define the type (int) for a new field in SQL SELECT INTO statement in MS Access

I want to define the new field in a select into statement as integer. However, the NewField ends up as …

sql ms-access select-into
How to select the value of a variable in Oracle?

I'm new to Oracle. How can I set this variable and show its value? declare nextId number; begin select HIBERNATE_…

sql oracle select select-into
SELECT or PERFORM in a PL/pgSQL function

I have this function in my database: CREATE OR REPLACE FUNCTION "insertarNuevoArticulo"(nombrearticulo character varying, descripcion text, idtipo integer, idfamilia …

postgresql function plpgsql select-into
How to use SELECT... INTO with a JOIN?

I have the following example code DECLARE myRow table%rowtype myVar table2.column%type BEGIN SELECT table.col1, table.col3, …

sql oracle join plsql select-into
Using temp table in PL/pgSQL procedure for cleaning tables

I'm trying to delete all data related to a user id from a game database. There is a table holding …

postgresql plpgsql select-into