I have a table with columns Q1 and Q2 say. I now want to define a view such that I have three columns in in Q1 Q2 and H1 such that each entry in H1 is the sum of corresponding entries Q1 and Q1
How can I do this as as SQL Query?
Thanks
I wouyld try this :
CREATE VIEW Q1Q2H1 AS
SELECT Q1,Q2,Q1+Q2 as H1
FROM Table
CREATE VIEW ComputedColumn AS
SELECT Q1, Q2, Q1 + Q2 AS H1
FROM myTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With