插入是创建表
CREATE PROCEDURE ordertwo AS set nocount on
declare @count int
select [name],city,"@count"=count(city) into Yourtable from tone group by name,cityGO
CREATE PROCEDURE ordertwo AS set nocount on
declare @count int
select [name],city,"@count"=count(city) into Yourtable from tone group by name,cityGO
--既然要将结果存放到另一个表,直接insert就行CREATE PROCEDURE ordertwo AS
insert 另一个表([保存@count的字段])
select count(city) from tone group by name,cityGO
不明白你的这句话
select [name],city,"@count"=count(city) into Yourtable from tone group by name,city
to: zjcxc(邹建)
谢谢,测试成功