Professional Documents
Culture Documents
Transactions
Transactions
BEGIN TRANSACTION;
INSERT INTO [Sales].[Currency]
VALUES('MDL', 'Leu Moldovenesc', '2024-04-14');
INSERT INTO [Sales].[CurrencyRate]
([CurrencyRateDate], [FromCurrencyCode], [ToCurrencyCode], [AverageRate],
[EndOfDayRate], [ModifiedDate])
VALUES('2024-04-15','MDL', 'EUR', 19.50, '2024-04-15', '2024-04-14')
COMMIT;
BEGIN TRANSACTION;
DELETE FROM [Sales].[CountryRegionCurrency]
WHERE[CurrencyCode] = 'MDL';
DELETE FROM [Sales].[Currency]
WHERE [CurrencyCode] = 'MDL';
ROLLBACK;
BEGIN TRANSACTION;
UPDATE [Sales].[CountryRegionCurrency]
SET [CurrencyCode] = 'AHD'
WHERE [CountryRegionCode] = 'AE';
UPDATE [Sales].[Currency]
SET [CurrencyCode] = 'AHD'
WHERE [CurrencyCode] = 'AED';
UPDATE [Sales].[CurrencyRate]
SET [FromCurrencyCode] = 'AHD'
WHERE [FromCurrencyCode] = 'AED';
UPDATE [Sales].[CurrencyRate]
SET [ToCurrencyCode] = 'AHD'
WHERE [ToCurrencyCode] = 'AED'
ROLLBACK;
BEGIN TRANSACTION;
UPDATE [Person].[PersonPhone]
SET [PhoneNumber] = '04646486484'
WHERE [BusinessEntityID] = 1;
UPDATE [Person].[EmailAddress]
SET [EmailAddress] = 'newAddress@hotmail.com'
WHERE [BusinessEntityID] = 1;
ROLLBACK;
BEGIN TRANSACTION;
DELETE FROM [Person].[PersonPhone]
WHERE[PhoneNumberTypeID] = 3;
DELETE FROM [Person].[PhoneNumberType]
WHERE [Name] = 'Work';
COMMIT;
BEGIN TRANSACTION;
UPDATE [Production].[Product]
SET [StandardCost]= 250.00
WHERE [ProductID] = 1;
INSERT INTO [Production].[ProductCostHistory]
([ProductID],[StartDate],[EndDate],[StandardCost] ,[ModifiedDate])
VALUES (1, '2024-04-14', null, 250.00, '2024-04-14');
ROLLBACK;
BEGIN TRANSACTION;
UPDATE [Production].[Product]
SET [ListPrice] = 300.00
WHERE [ProductID] = 1;
INSERT INTO [Production].[ProductListPriceHistory]
([ProductID],[StartDate],[EndDate],[ListPrice] ,[ModifiedDate])
VALUES (1, '2024-04-14', null, 300.00, '2024-04-14');
ROLLBACK;