Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Quiz
--Your database contains tables named Products and ProductsPriceLog. --The Products table contains columns named ProductCode and Price. The ProductsPriceLog table contains columns --named ProductCode, OldPrice, and NewPrice. The ProductsPriceLog --table stores the previous price in the OldPrice column and the new price in the NewPrice column. --You need to increase the values in the Price column of all products in the Products table by 5 percent. --You also need to log the changes to the ProductsPriceLog table. Which Transact-SQL query should you use? create table Products(ProductCode int,price int) create table ProductsPriceLog(ProductCode int, OldPrice int, NewPrice int) insert into Products values(1,10),(2,15),(3,30) update Products set price=price * 1.5 output inserted.ProductCode,deleted.price, inserted.price into ProductsPriceLog select * from ProductsPriceLog
run
|
edit
|
history
|
help
0
TSQL - Globally unique string generator
Comercio
Varchar to Binary and vice-versa
Tarea1
SQL Server : Calculate Going Step (Yutthana Thanomklay)
Names
Employee Department Interview Questions
Trabalho.Agrecação
Task_4_Final
sql6