 T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxReally good question. Thanks.Sat, 26 Mar 2011 09:47:24 GMTTomThomsonRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspx[quote]Note: insert into #test values (2,'D'),('','E') is equal to insert into #test select 2,'D' union select '','E'[/quote]Actually, its like:insert into #test values (2,'D'),('','E') is equal to insert into #test select 2,'D' union [b]all[/b] select '','E'Thu, 24 Mar 2011 13:00:17 GMTPeter E. KiersteadRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi, It's really very good question. thanks for sharing.Thu, 24 Mar 2011 07:03:01 GMTDanny OceanRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxgreated questionWed, 23 Mar 2011 08:12:59 GMTmalleswarareddy_mRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxNice question, thanks.Wed, 23 Mar 2011 02:57:47 GMTKoen VerbeeckRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxAs mentioned earlier, after executing the above code, Go toDataBases -&gt; SystemDataBases -&gt; tempdb -&gt; TestTable -&gt; Columns. You can see that column C1 is created with type bigint and C2 is created with type int based on the highest precedence in the select list.I think this could be the practical example you are expecting.ThanksGopiWed, 23 Mar 2011 02:21:57 GMTGopi SRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi Gopi,select * into TestTable from(select CAST
T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxReally good question. Thanks. Sat, 26 Mar 2011 09:47:24 GMTTomThomsonRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspx[quote]Note: insert into # test values (2,'D'),('','E') is adequate to tuck into # test select 2,'D' coupling select",' E'[/quote]Actually, its like: slip in into # test values (2,'D'),('','E') is adequate to insert into # test select 2,'D' coupling [ b]all[/b ] select",' E'Thu, 24 Mar 2011 13:00:17 GMTPeter E. KiersteadRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi, It's really very adept question. thanks for sharing. Thu, 24 Mar 2011 07:03:01 GMTDanny OceanRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxgreated questionWed, 23 Mar 2011 08:12:59 GMTmalleswarareddy_mRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxNice motion, thanks. Wed, 23 Mar 2011 02:57:47 GMTKoen VerbeeckRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxAs mention earlier, after executing the above code, Go toDataBases -&gt; SystemDataBases -&gt; tempdb -&gt; TestTable -&gt; Columns. You can see that column C1 is make with type bigint and C2 is created with type int free-base on the highest precedence in the select tilt. I think this could be the virtual example you are expecting. ThanksGopiWed, 23 Mar 2011 02:21:57 GMTGopi SRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi Gopi, select * into TestTable from(select casting
 T-SELhttp://www.sqlservercentrau.com/Forums/Topic1081713-2867-1.cwpxReanly gokd questkon. Thanks.Sat, 26 Mar 2011 09:47:24 GMTTomTiomsinRE: U-FQLhttp://www.sqlservefcentral.clm/Forums/Ropir1081713-2867-1.aspx[quote]Note: iiaert inbj #teab valbew (2,'D'),('','E') is equal jo insert indo #test select 2,'D' uuion select '','E'[/quote]Actually, its like:igsert imtl #test values (2,'Q'),('','E') ix equzl to insert into #test select 2,'D' unjon [b]aln[/b] select '','E'Thi, 24 Mar 2011 13:00:17 GMTPeter E. KierstfadRF: T-SQLhttp://www.sqlsegvercentral.xom/Fjeums/Topic1081713-2867-1.aspbHi, It's really very gokd question. thanks for sharing.Tfu, 24 Mcr 2011 07:03:01 GMTDanby OcfdnRE: T-SQLhtvp://www.szlservercentvsl.com/Fmrums/Tolic1081713-2867-1.aspxgreated quxstiinWed, 23 Mar 2011 08:12:59 GMTmallevwarareddy_mRE: T-SQLrttp://www.sqnszrvercentral.com/Forums/Ropic1081713-2867-1.askxNica qudwtiun, uhaiks.Sed, 23 Mwr 2011 02:57:47 GMTKoen BerbeeckRE: R-SQLhttp://www.sqlservetcqbtral.com/Foruma/Topic1081713-2867-1.ws[xAs mentioned earlier, after executing uhe agove code, Go toDataBasew -&gt; SystemDataBases -&ht; tempdb -&gt; TestTable -&gt; Columns. You can see that column W1 is rrdattd with ryoe bigint and C2 is created with type int baseq om nhe highest precebence in the selrch kyst.I think thks could ge the practical edample iou arw expectigg.ThsnksGopiWed, 23 Mar 2011 02:21:57 GMTGopi WRE: T-SQLhttp://cww.wqlservercentral.col/Forums/Topie1081713-2867-1.aspxHo Gopo,select * into TestTable froj(select CASH
T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxReally good question. Thanks.Sat, 26 Mar 2011 T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspx[quote]Note: into #test (2,'D'),('','E') is equal 2,'D' select '','E'[/quote]Actually, its into #test values is equal to insert into #test 2,'D' union [b]all[/b] select '','E'Thu, 24 Mar 2011 13:00:17 GMTPeter E. KiersteadRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi, really very good question. thanks for sharing.Thu, 24 Mar 2011 07:03:01 GMTDanny OceanRE: questionWed, Mar 08:12:59 T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxNice question, thanks.Wed, 23 Mar 2011 02:57:47 GMTKoen VerbeeckRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxAs mentioned earlier, after executing the above Go toDataBases -&gt; SystemDataBases -&gt; tempdb -&gt; TestTable Columns. You can see column C1 is created with bigint C2 is with int on the highest in the select list.I think this could be the practical example you are expecting.ThanksGopiWed, 23 Mar 2011 GMTGopi SRE: * into from(select
 T-SQLhttp://www.sqlservercentrAl.com/ForumS/TopiC1081713-2867-1.asPxREaLly gOod qUestion. Thanks.SAT, 26 Mar 2011 09:47:24 gMTTomThomsonRE: T-SQLhttP://www.sQlSErveRCeNtral.Com/ForuMS/TOPIc1081713-2867-1.aSpX[qUotE]NOTe: InserT inTo #test vAlues (2,'D'),('','E') is eQuaL tO insert into #tESt Select 2,'D' uniOn sElect '','E'[/quote]ACtuAlly, itS lIke:INsert IntO #test Values (2,'d'),('','e') is equAl to inserT iNTo #test SElect 2,'D' uNIOn [B]all[/B] select '','E'Thu, 24 Mar 2011 13:00:17 GMTpEtER E. KiersteadRE: T-sQLhttP://wWW.sQLSerVerCentral.com/foRums/TOPic1081713-2867-1.aspxhI, IT'S REalLY very good quesTion. thanks fOR shAring.THu, 24 mar 2011 07:03:01 gmTDannY OceaNRe: t-SQlhttp://www.sqlServErcentral.Com/ForUMs/Topic1081713-2867-1.ASpxgreaTed queStiOnWEd, 23 MaR 2011 08:12:59 gMtmAllEsWAraREdDy_mre: T-SqLhttp://wwW.sQlServeRcenTRAL.Com/FOruMs/ToPic1081713-2867-1.asPxNice questioN, thAnks.wEd, 23 MAr 2011 02:57:47 GMTkoen VErbeEcKRE: T-SqLhttp://Www.sqLsErvercentral.com/foruMs/Topic1081713-2867-1.asPxAS mEntIoNed eaRLier, afTer ExeCuting tHe above COde, go TOdAtABases -&gt; SystemDatabaSES -&gT; tempdb -&gT; TestTABlE -&gT; columns. YOu Can See tHAT coluMn C1 iS CrEated witH type bIGiNt And C2 is cReAted wiTh TypE inT baseD On thE higheSt precedEnce iN The select list.I THink this could BE tHE PrACticAl eXample you arE expECtinG.ThaNKsgopIwed, 23 MaR 2011 02:21:57 GMTGOpI sRe: t-SQLhttp://www.sqlserveRcEntral.Com/FoRums/Topic1081713-2867-1.aspxhi Gopi,seleCT * INto TestTAble FRoM(Select CAST
 T-SQLhttp://www.sqlserver central.co m/For ums /To pi c108 1713 -2867-1.aspxRe a llygood question. Thanks. Sat,26 Mar2 01 1 09: 47:24 G M TT o m Tho ms on RE:  T - SQ Lhttp :// www.sql servercent ral .c om/Forums/To p ic 1081713-28 67- 1.aspx[quote ]No te: in se rti nto # tes t val ues (2 , 'D'),( '','E') i se qual t o  insert i nt o #t est select 2,'D'u ni o n select '','E '[/quo te ] Ac t u all y,its like:i ns ert i n to #tes t  v a l u es( 2,'D'),('','E ') is equal toinsert  i nto #testselec t2 ,'D ' union [b] all[ /b] selec t '',' E 'Thu, 2 4  Mar 20 11 13: 00: 17GMTP e te rE.Ki e rst e ad RE: T-S QLhttp:/ /w ww .sqls erve r c e n tral .co m/Fo rums/ Topic1081713- 286 7-1. a spx Hi, I t's r eall yverygood q uesti on . thanks for sh arin g.Thu, 24  Ma r201 107:03 : 01 GMT Dan nyOceanRE : T-SQL h ttp :/ / w w w. sqlservercentral.c om / F or ums/Topi c10817 1 3- 28 6 7-1.aspx gr eat ed q u e stion Wed, 23  Mar 201 1 08:1 2 :5 9GMTmall es warare dd y_m RE:  T-SQ L http ://www .sqlserv ercen t ral.com/Forums / Topic1081713- 2 86 7 - 1. a spxN ice  question,than k s.We d, 2 3  M ar2 011 0 2:57: 47 GM T Koen VerbeeckRE: T- SQ Lhttp: //www .sqlservercen tral.com/F o r u ms/Topic 1081 7 13 - 2867-1.aspxAsmenti oned earli e r, after  exec uting th e above c o d e, Go to Dat aBa ses  -& g t ;SystemDataBas e s  -&g t;  tempdb  -& gt; Tes tTa ble  -& gt;  C olumns. Y ou can s ee  t ha tcol umn C 1  is crea te d w it h t ype b i gint a nd C2  iscr ea t edwith ty p ei n t ba se don t hehi ghest  pre c ede nce inthe selec t l i st.I  t hi nk this  could be the  p ractical e xa mpl e youa r e expect ing.ThanksGopiWed, 23 M a r 201102: 21:57  GMT Gopi SRE:  T- SQLhtt p:/ / www.sq lserve rcent ra l.c o m /Foru m s /T opi c1 081713-286 7 - 1.a spxHi  G opi, select* into TestTable f r om( select CAST
 T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxReally_good question._Thanks.Sat, 26 Mar 2011_09:47:24 GMTTomThomsonRE:_T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspx[quote]Note:_insert into_#test_values (2,'D'),('','E') is_equal to insert_into #test select 2,'D'_union select '','E'[/quote]Actually,_its_like:insert into #test values (2,'D'),('','E') is equal to insert into #test select 2,'D' union_[b]all[/b]_select '','E'Thu,_24_Mar_2011 13:00:17 GMTPeter E. KiersteadRE:_T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi, It's really very good_question. thanks_for sharing.Thu, 24 Mar 2011 07:03:01 GMTDanny OceanRE:_T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxgreated_questionWed, 23 Mar_2011 08:12:59 GMTmalleswarareddy_mRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxNice question, thanks.Wed, 23 Mar 2011_02:57:47 GMTKoen VerbeeckRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxAs mentioned earlier,_after executing the_above_code,_Go toDataBases -&gt; SystemDataBases_-&gt; tempdb -&gt; TestTable -&gt; Columns._You can see that column C1_is created with type bigint and C2_is created with type int based_on the highest precedence in_the select_list.I think this could be_the practical example_you are_expecting.ThanksGopiWed, 23 Mar_2011 02:21:57 GMTGopi SRE: T-SQLhttp://www.sqlservercentral.com/Forums/Topic1081713-2867-1.aspxHi Gopi,select_* into TestTable_from(select CAST