SET NOCOUNT ON
Declare @Sql Nvarchar(max),@Sql1 Nvarchar(max)
CREATE TABLE #tmpCity (CityIDP BigInt, CityName Varchar(50))
SET @Sql = 'INSERT INTO #tmpCity SELECT CityIDP, CityName FROM mCity'
EXEC(@Sql)
SELECT @@ROWCOUNT
SET @Sql1 = 'SELECT * FROM #tmpCity'
EXEC(@Sql1)
GO
drop table #tmpCity
Declare @Sql Nvarchar(max),@Sql1 Nvarchar(max)
CREATE TABLE #tmpCity (CityIDP BigInt, CityName Varchar(50))
SET @Sql = 'INSERT INTO #tmpCity SELECT CityIDP, CityName FROM mCity'
EXEC(@Sql)
SELECT @@ROWCOUNT
SET @Sql1 = 'SELECT * FROM #tmpCity'
EXEC(@Sql1)
GO
drop table #tmpCity
No comments :
Post a Comment