首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

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

2012-02-04 
这个SQL语句在Mysql中该怎样写? selectididentity(int,1,1),cinto#from(selectc@str1unionselectc@str2

这个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);

热点排行