Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Add defination in column while create table
-- See total column CREATE TABLE TestTable (ID INT, Value1 INT,Value2 int,Total as Value1+Value2) INSERT INTO TestTable (ID, Value1,Value2) SELECT 1, 10,10 UNION ALL SELECT 2, 20,20 UNION ALL SELECT 3, 30,30 UNION ALL SELECT 4, 40,40 UNION ALL SELECT 5, 50,50 UNION ALL SELECT 6, 60,60 UNION ALL SELECT 7, 70,70 GO SELECT ID, Value1,Value2,Total FROM TestTable
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
sarthak rana
BRYAN
1512081 QUAN LY DE TAI
Split name
MC170402209
db
MERGE with OUTPUT
Demo
M0413045.sql
Miercoles
Please log in to post a comment.