Insert data into a temporary table, when, and how to insert an auto-incremented field

2010-03-23  来源:本站原创  分类:Database  人气:253 

Statement: IDENTITY (int, 1,1) as PPid

For example: the temporary tables 1 and 2, the data in the temporary table into the temporary table 3, and three in the temporary table to add an auto-incremented field.

select
IDENTITY (int, 1,1) as PPid
, # Temp11 .*
, # Temp21.FlowingID
, # Temp21.RecruiteID
, # Temp21.ExamNum
, # Temp21.ExamDate
, # Temp21.ExamID
, # Temp21.RecordID
, # Temp21.SuveryState
, # Temp21.Content
, # Temp21.OperID
, # Temp21.OperName
into # temp31
from
# Temp11,
# Temp21
where
# Temp11.ID *= # temp21.RecruiteID

select

table1.ID as RecruiteID
, Table1.Name
, Table2.ExamNum
, Convert (varchar (10), table2.ExamDate, 120) as ExamDate

, Table2.ExamID
, Table2.RecordID
, Table2.SuveryState
, Table2.Content

, Table2.OperID
, Table2.OperName
from
# Temp31 as table1
, # Temp31 as table2
where
table1.PPID = table2.PPID

相关文章
  • Insert data into a temporary table, when, and how to insert an auto-incremented field 2010-03-23

    Statement: IDENTITY (int, 1,1) as PPid For example: the temporary tables 1 and 2, the data in the temporary table into the temporary table 3, and three in the temporary table to add an auto-incremented field. select IDENTITY (int, 1,1) as PPid , # Te

  • sql data in the temporary table into another table 2010-04-19

    sql data from the temporary table into another table 1, the temporary table data insert into another table insert into table select * from # temp 2, to a table in the field to the temporary table select * into # temp from table where 1 = 2 3, the loc

  • SQLServer to the result set data into the temporary table 2011-05-27

    select row 1, column 2, column 3 into # temporary exemplar name from table name Or select row 1, column 2, column 3 exemplar name into # temporary from ( Result set )

  • The creation of temporary table 2010-03-04

    1 Syntax In Oracle, you can create the following two temporary table: 1) session-specific temporary table CREATE GLOBAL TEMPORARY () ON COMMIT PRESERVE ROWS; 2) transaction-specific temporary table CREATE GLOBAL TEMPORARY () ON COMMIT DELETE ROWS; CR

  • oracle temporary table usage summary 2010-03-26

    1 Introduction At present, all using Oracle as the database application support platform, most of the relatively large amount of data the system, that is, the amount of data table under normal circumstances are 1 million more than the amount of data.

  • Oracle temporary table (reproduced) 2010-05-05

    1 Introduction At present, all using Oracle as the database application support platform, most of the relatively large amount of data the system, that is, the amount of data table under normal circumstances are 1 million more than the amount of data.

  • the use of temporary table oracle 2010-06-13

    Of the problem: Consider the following SQL statement: select * from (select rownum r_id, t_tmp.* from (select p.*, o.NAME_ZH, o.NAME_EN, o.NAME_JP, o.ORG_DESC_ZH, o.ORG_DESC_EN, o.ORG_DESC_JP, c.name_zh city_name_zh, c.name_en city_name_en, c.name_jp

  • Oracle in a temporary table (working with real table) 2010-06-16

    1 Introduction At present, all supporting platform using oracle as a database application, most of the relatively large amount of data the system, that is, the amount of data table under normal circumstances are 1 million more than the amount of data

  • oracle temporary table 2010-06-23

    oracle temporary tables referenced in this article http://www.blogjava.net/pdw2009/archive/2007/06/20/125383.html In Oracle8i or later, you can create the following two temporary table: 1. Session-specific temporary table CREATE GLOBAL TEMPORARY <TAB

  • (Transfer) oracle temporary table usage summary 2010-07-22

    http://blog.csdn.net/wyzxg/archive/2007/11/13/1882347.aspx oracle temporary table usage summary collection Keyword: Basic concepts, principles The characteristics of the temporary table, when to use Ago, the new company's interviewer asked a question

  • Oracle temporary table (change) 2010-09-01

    In Oracle8i or later, you can create the following two temporary table: 1. Session-specific temporary table CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>) ON COMMIT PRESERVE ROWS; 2. Transaction-specific temporary table CREATE G

  • [Transfer] Oracle temporary table 2010-10-19

    In Oracle8i or later, you can create two temporary tables: 1. Session-specific temporary table CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>) ON COMMIT PRESERVE ROWS; 2. Transaction-specific temporary table CREATE GLOBAL TEMPORA

  • Temporary table (Temporary Table) 2010-10-29

    At present, all using Oracle as the database application support platform, most of the relatively large amount of data the system, that is, the amount of data tables are in general more than one million the amount of data. Of course, create a partiti

  • oracle temporary table summarizes the usage of 2010-12-31

    Some time ago, the new company's interviewer asked a question, the role of temporary table, before the middle of the data cache when we are to build their own a temporary table. In fact, oracle itself has been considered in this context is all, unles

  • Oracle temporary table (turn) 2010-09-01

    In Oracle8i or later, you can create two temporary tables: 1. Session-specific temporary table CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>) ON COMMIT PRESERVE ROWS; 2. Transaction-specific temporary table CREATE GLOBAL TEMPORA

  • Understanding of the session from the oracle temporary table with the link 2011-03-10

    Spend more time with the oracle, but simply to use, with little concern for some basic things, such as the oracle of the difference between conversation and links, I'm too lazy to see a lot of introduction, just read the oracle temporary table usage,

  • ORACLE The temporary table 2011-06-26

    You can use the temporary table ORACLE Reproduced Temporary Tables Temporary tables directory 1 Introduction 2 Details 3 Create a temporary table Similarities and differences between 4 and SQL SERVER 1 Introduction In addition to the ORACLE database

  • SqlServer temporary table and While Loop 2011-09-13

    1 defines a temporary table @ temptb DECLARE @temptb TABLE ( [id] int indentity(1,1), UserName nvarchar(50), Password varchar(20) ) (2) to add data to the temporary table Will memberInfo UserName and Password in the table inserted into the temporary

  • The temporary table oracle 2011-09-20

    Reference material 1 Oracle temporary table usage http://www.iteye.com/topic/371390 2 oracle temporary table to learn http://shmily-zjl.iteye.com/blog/670458 3 oracle temporary table summarizes the usage of http://fangrn.iteye.com/blog/567191 4 oracl

  • oracle 9i temporary table space 2010-03-04

    Taken from: http://hi.baidu.com/zzztou/blog/item/f8733707008383c87b8947b3.html Normally, the complete Select statement, create index using the TEMP table space and some sort is done, Oracle will automatically release the temporary section of a swap o