Hi,I was writing the store procedure in granting permission to different tables in SQL Server 7.0I always getting syntax error near the "TO" statement. I can't hardcode the "@db_cc" as i have few tables to run through thisstore procedure.Below are my codes. Can anyone helped me this as i am quite new to store procedure.Thanks in advance.CREATE PROCEDURE sp_table@dbname nvarchar(30)AS Declare @db_cc varchar(15), @db_dd varchar(15)Select @db_cc = @dbname plus '_xxx1'Select @db_dd = @dbname plus '_xxx2' GRANT SELECT,INSERT, UPDATE, DELETE ON table TO @db_cc GO