How to get the compressed and uncompressed backup script in SQL Server

How to get the compressed and uncompressed backup script in SQL Server

Uncompressed Backup

BACKUP DATABASE [YourDatabaseName] TO
DISK = N'C:\backup\uncompressed-backup.bak'
WITH NO_COMPRESSION, STATS = 10
GO

Compressed Backup

BACKUP DATABASE [YourDatabaseName] TO
DISK = N'C:\backup\compressed-backup.bak'
WITH COMPRESSION, STATS = 10
GO

If you want to restore backup then go ahead.

RESTORE DATABASE [YourDatabaseName]
FROM DISK = N'C:\backup\compressed-backup.bak'
WITH RECOVERY
GO
---
RESTORE DATABASE [YourDatabaseName]
FROM DISK = N'C:\backup\uncompressed-backup.bak'
WITH RECOVERY
GO