Default order of temp table

0

Please login or register to vote for this query.

(click on this box to dismiss)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

create table #tbl (mon char(8) null,id int null, cnt int null);
insert into #tbl (mon,cnt) values
('jul 2014',3100),('jan 2014',3200),
('may 2015',2300),('feb 2015',2600),
('aug 2014',1800),('mar 2015',3700),
('jun 2014',2400);
select * into #temp2 from #tbl
select * from #temp2
--select * from #tb1

update #tbl set id = datepart(month,cast(mon as datetime)) where id is null;
select * from #tbl order by id;
insert into #tbl (mon,cnt) values
('apr 2015',4500);
update #tbl set id = datepart(month,cast(mon as datetime)) where id is null;
select * from #tbl

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results