欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Mysql數(shù)據(jù)表怎么打8折 macbook窗口快捷鍵

數(shù)據(jù)庫中原價(jià)格八折條件設(shè)置?

alter table 表名 add column ‘折扣’float(8,4);

創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的調(diào)兵山網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

update 表名 (‘折扣’)set ‘折扣’=原價(jià)*80%;

創(chuàng)建一個(gè)存儲過程,將Northwinds數(shù)據(jù)庫中Products表中價(jià)格全部打8折(會(huì)用到游標(biāo))

假如Products表中id是主鍵

創(chuàng)建測試表及測試數(shù)據(jù)

create?table?Products

(id?int?primary?key,

price?int)?

insert?into?Products?values?(1,100)

insert?into?Products?values?(2,200)

創(chuàng)建存儲過程

create?procedure?p_products

as

declare?@id?int

declare?c_pro?cursor??for

select?id?from?Products

open?c_pro

fetch?next?from?c_pro?into?@id

while?@@fetch_status?=?0

begin

update?Products?set?price=price*0.8?where?id=@id

fetch?next?from?c_pro?into?@id

end

close?c_pro

deallocate?c_pro

執(zhí)行存儲過程

exec?p_products

執(zhí)行后表內(nèi)數(shù)據(jù)

excel表中一例數(shù)據(jù)如何計(jì)算出8折的數(shù)據(jù)

如圖:在另一列輸入“=然后選取你需要列的第一行*0.8”,確定。下拉復(fù)制

文章題目:Mysql數(shù)據(jù)表怎么打8折 macbook窗口快捷鍵
網(wǎng)站URL:http://www.chinadenli.net/article44/ddoicee.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)營銷型網(wǎng)站建設(shè)建站公司網(wǎng)站收錄網(wǎng)站排名自適應(yīng)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作