I'm having trouble using the ALTER SEQUENCE statement in SQL Server.
This is the code I'm using:
ALTER SEQUENCE MakatiORSeries RESTART WITH 23;
And this is what I'm getting:
Msg 15151, Level 16, State 1, Line 7
Cannot alter the sequence 'MakatiORSeries', because it does not exist or you do not have permission.
But when I select all the sequences from sys.sequences, it is there
SELECT *
FROM sys.sequences
WHERE [name] = 'MakatiORSeries'
I tried these references too:
SQL Server sequence set current value
Use a variable or parameter to specify restart value for ALTER SEQUENCE
Any help is greatly appreciated. Thanks!
alter sequences.fn_my_permissionshere is the msdn link : msdn