temp_table

http://www.belajarsqlserver.com/2015/10/sql-server-temp-table.html


create table #TempCustomer
(
id_customer int,
name varchar(100),
Address varchar(200),
Telp varchar(15)
)

berikut contoh tabel global:

create table ##TempCustomer
(
id_customer int,
name varchar(100),
Address varchar(200),
Telp varchar(15)
)



Cara pertama


create table  #temp_access (id int, emplcode int, level int, status varchar(50))

select * from #temp_access


Cara kedua , dengan menggunakan select - insert : ngambil data dari tabel lain.


select AJH_ID, AJD_Emplcode , AJD_LevelCheckID, AJD_Status ,AJD_Username,  AJD_LastUpdate ,  ajd_checkdetail
into #temp_access
from  tm_accessdt
inner join tm_accesshd a on AJD_HeaderID=AJH_ID where  AJD_Emplcode=20260

0 Response to "temp_table"

Posting Komentar