18 lines
422 B
Plaintext
18 lines
422 B
Plaintext
USE AdventureWorks2022;
|
|
GO
|
|
IF OBJECT_ID('dbo.NewProducts', 'U') IS NOT NULL
|
|
DROP TABLE dbo.NewProducts;
|
|
GO
|
|
ALTER DATABASE AdventureWorks2022 SET RECOVERY BULK_LOGGED;
|
|
GO
|
|
|
|
SELECT * INTO dbo.NewProducts
|
|
FROM Production.Product
|
|
WHERE ListPrice > $25
|
|
AND ListPrice < $100;
|
|
GO
|
|
ALTER DATABASE AdventureWorks2022 SET RECOVERY FULL;
|
|
GO
|
|
|
|
-- From https://learn.microsoft.com/en-us/sql/t-sql/queries/select-examples-transact-sql
|