读书人

这个SQL语句在Mysql中该怎样写?该如何

发布时间: 2012-02-04 15:43:08 作者: rapoo

这个SQL语句在Mysql中该怎样写?

select id=identity(int,1,1),c into #
from (
select c=@str1
union select c=@str2
union select c=@str3
union select c=@str4) t

[解决办法]
create temporary table `#`(id int(11) not null auto_increment primary key,str varchar(255));
insert into `#`(str) values(@str1),(@str2),(@str3),(@str4);

读书人网 >Mysql

热点推荐