-- Batch submitted through debugger: SQLQuery1.sql|0|0|C:\Users\Sahel\AppData\Local\Temp\~vsC87D.sql
create proc [dbo].[sp_create_database]
@DBname varchar(10),
@Filename varchar(max),
@ERROR VARCHAR(MAX) output
AS
BEGIN TRY
IF db_id(@DBname) is null
CREATE DATABASE [@DBname]
On(Name= [@DBname + '_Data'],FileName=[@Filename],Size = 3mb,MAXSIZE = UNLIMITED)
LOG
ON(Name = [@DBname + '_Log'],FileName=[@Filename + '.Ldf'] ,Size=1MB ,MAXSIZE=UNLIMITED)
Else
set @ERROR = (N'DataBase Exists_Please Change The Name Of Database')
return 0
END TRY
BEGIN CATCH
SET @ERROR = ERROR_MESSAGE()
RETURN 1
END CATCH
It's NOt Work Help Me PLZ ???