_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
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

"覩語" 手 襷 覦 覦朱慨覃伎 . (ろ 碁狩)