Question : Database backup using stored proc

I want to create a stored procedure that will perform full backup of my database. I am getting the following error
Error 170: Line 4: Incorrect syntax near 'E:\Backups\mydb.bak'

Can anyone help?
Code Snippet:
1:
2:
3:
4:
5:
CREATE PROCEDURE dbo.spBackupMyDB
AS
BACKUP DATABASE mydb
TO DISK 'E:\Backups\mydb.bak'
GO

Answer : Database backup using stored proc

missing the =

CREATE PROCEDURE dbo.spBackupMyDB
AS
BACKUP DATABASE mydb
TO DISK ='E:\Backups\mydb.bak'
Random Solutions  
 
programming4us programming4us