Skip to content

select into

Tako Lee edited this page May 27, 2017 · 30 revisions

select into, can be used to select record into table(maybe temporary table) or variable.

  • select into table

    SQL Server: Temporary tables come in different flavours including, amongst others, local temporary tables (starting with #), global temporary tables (starting with ##), persistent temporary tables (prefixed by TempDB..), and table variables.(starting with (@)

    PostgreSQL

  • select into variable|variable list|record name

    Oracle

    MySQL: sql SELECT id, data INTO @x, @y FROM test.t1 LIMIT 1;

Clone this wiki locally