_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › RowConstructors
覯 Row襯 ロ . 讌 襯 覲企 危願 觜襯企.
use tempdb
go

--drop table source_table
create table source_table (
	id varchar(10)
,	pw varchar(10)
);

--drop table target_table
create table target_table (
	id varchar(10)
,	pw varchar(10)
);

--drop table audit
create table audit(
	action varchar(50)
,	insert_id varchar(10)
,	insert_pw varchar(10)
,	delete_id varchar(10)
,	delete_pw varchar(10)
);

insert source_table values 
	('dwa', '1234')
,	('yasi', '4567')
,	('lk', 'lk123'); --new syntax, T-SQL Row Constructors
go

/*谿瑚襦 企郁 螳ロ.
select *
from (
	values
		('dwa', '1234')
	,	('yasi', '4567')
	,	('lk', 'lk123')
) t(id, passwd)


;with test
as
(
	select * 
	from (
		values
			(1, 'aaa')
		,	(2, 'bbb')
	) t (id, name)
)
select * 
from test a
	cross join (values (1), (2)) b (id)
*/
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

朱 企Υ 覓伎 螻 苦給蟾? 朱 讌覓語 覦 給. 讌讌蟆 企蟆 牛給. 覦れ. 蟇企逢讌蟆 l 襷. 襷 讌 螻 苦給. <覦 覩瑚記 企>