Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use IDENTITY function
Message
From
14/03/2004 20:11:36
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
How to use IDENTITY function
Miscellaneous
Thread ID:
00886170
Message ID:
00886170
Views:
55
Hello ,everyone!
I use IDENTITY function is Error ,I don,t kown how to use IDENTITY()

This is my code:

use taxi
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'aa')
DROP TABLE aa
GO

declare @Num as tinyint
select @Num=max(CodeId) from c_mz

select IDENTITY (tinyint,@Num ,1 ) AS id_num, MZ into aa from driverTemp where MZ IS NOT NULL group by MZ order by MZ

go



"Line 5 : '@Num' syntax error
Why IDENTITY Arguments "send" cann't use variable
What's wrong?

Help me ,thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform