問:
INSERT INTO test.dbo.高考 ([姓名],[準(zhǔn)考證],[語文],[數(shù)學(xué)],[英語],[+1課程],[綜合],[加分],[總分]) VALUES
('Marry'
,000001
,100
,100
,120
,123
,120
,0
,0)
總么寫一句語句,直接把總分加出來,謝謝幫忙了
--------------------------------------------------
create table 高考 ([姓名] varchar(20),[準(zhǔn)考證] varchar(20),[語文] float,[數(shù)學(xué)] float,[英語] float,[+1課程] float,[綜合] float,[加分] float,[總分] as [語文]+[數(shù)學(xué)]+[英語]+[+1課程]+[綜合]+[加分]
)
go
INSERT INTO 高考 ([姓名],[準(zhǔn)考證],[語文],[數(shù)學(xué)],[英語],[+1課程],[綜合],[加分]) VALUES
('Marry'
,000001
,100
,100
,120
,123
,120
,0
)
go
select * from 高考
go
drop table 高考
/*
姓名 準(zhǔn)考證 語文 數(shù)學(xué) 英語 +1課程 綜合 加分 總分
-------------------- -------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ----------------------
Marry 1 100 100 120 123 120 0 563
(1 行受影響)