<address id="xpjh9"><listing id="xpjh9"><meter id="xpjh9"></meter></listing></address>

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
<noframes id="xpjh9">
<noframes id="xpjh9">

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
    <form id="xpjh9"></form><address id="xpjh9"><listing id="xpjh9"><menuitem id="xpjh9"></menuitem></listing></address>

      <noframes id="xpjh9">
      VB.net 2010 視頻教程 VB.net 2010 視頻教程 VB.net 2010 視頻教程
      SQL Server 2008 視頻教程 c#入門經典教程 Visual Basic從門到精通視頻教程
      當前位置:
      首頁 > 數據庫 > T-SQL >
      • sql語句大全之DELETE語句

      • 2015-01-25 00:44 來源:未知

      DELETE語句sql語句大全

      當數據庫的添加工作完成以后,隨著使用和對數據的修改,表中可能存在一些無用的數據,這些無用的數據不僅會占用空間,還會影響修改和查詢的速度,所以應及時將它們刪除。本節主要介紹幾種最常用的刪除方法。

      6.3.1  DELETE語法

      在SQL支持的所有數據修改語句中,DELETE語句可能是最簡單的語句。它只包含兩個子句,其中一個子句是強制性的。DELETE語句的語法格式如下:
      DELETE FROM <table name>
      [WHERE <search condition>]
      DELETE FROM子句是必選項,要求指定從中刪除行的表的名稱,WHERE子句是可選項,類似于SELECT和UPDATE這兩個語句中的WHERE子句,它要求指定搜索條件。如果在DELETE語句中沒有包括WHERE子句,那么將從指定的表中刪除所有行。
       
      DELETE語句只從表中刪除數據,它不刪除表定義本身。如果要刪除數據和表定義,應使用DROP TABLE語句。
      在DELETE語句中沒有指定列名,這是由于不能從表中刪除單個列的值,只能刪除行。如果需要刪除特定的列值,應使用UPDATE語句將該值設置為空值,不過,必須只有在該列支持空值時才可以這么做。

      6.3.2  使用DELETE語句

      上面介紹了DELETE的語法以及注意事項,下面通過幾個具體實例,來詳細介紹一下如何使用DELETE語句刪除表中的數據。首先看怎么刪除一個表中的所有數據。例如刪除商品信息里的所有數據,可以使用如下DELETE語句:
      DELETE FROM 商品信息
      這只是在需要刪除所有語句時才可以使用這條語句。不過,這種情況使用的并不多,更多的時候,需要使用WHERE子句來指定要刪除的行。例如要刪除商品信息表中的商品名稱為“VE眼霜”的所有信息,可以使用如下DELETE語句:
      DELETE FROM 商品信息
      WHERE 商品名稱=‘VE眼霜’
      執行上面語句后,“VE眼霜”的信息將被刪除。
      如果用戶需要刪除包含某些字段的信息,例如,需要刪除商品信息表中的包含“蘋果”字段的商品名稱。則可以使用如下DELETE語句:
      use 購物系統
      go
      DELETE FROM 商品信息 where 商品名稱 like '%蘋果%'
      Go
      執行上述語句后,顯示結果如圖6-15所示。與原始數據相比,結果集里不再顯示所有包含“蘋果”字段的商品信息。原始數據見圖6-14。

      圖6-15  執行上述語句后的結果
      如果需要刪除商品信息表中的20%,可以使用如下DELETE語句:
      DELETE TOP(20) PERCENT 商品信息
      執行述語句后,商品信息表中將會刪除前2條語句(原來共有9條語句)。結果如圖6-16所示。

      圖6-16 刪除其表20%后的結果集
      實際上,如果需要刪除圖書信息表的前2行,也可以使用如下DELETE語句:
      DELETE TOP(2) 商品信息
      相關教程
      江苏快3 www.333460.com | www.1434h.com | www.866918.com | tc88.com | www.178725.com | www.5677758.com | www.98am444.com | 40033e.com | 33313u.com | www.0601k.com | www.cdzzcx.com | bet36500600.com | 6868ff.cc | www.54968g.com | www.799666e.com | 30006.com | 001122331.com | www.33112t.com | y854.com | www.35155s.com | www.940999.com | tt4675.com | 112o.net | www.160882.com | www.vns18158.com | www.ks600.net | 0747kk.com | 4178111.com | www.c2953.com | www.4058zz.com | www.6666845.com | v0141.com | 0638.am | www.50052n.com | www.f526688.com | www.28758p.com | 4005dh.com | www.66376v.com | www.79579.com | www.608568.com | www.hg288.com | 566777e.com | 29918c.com | www.34788x.com | www.16181j.com | www.8694g.com | www.548277.com | www.b32031.com | www.hg58.pw | dazhuangjia.me | vns8y.com | www.281380.com | www.560900.com | www.20199pp.com | www.333222u.com | 3614m.com | s86811.com | www.626310.com | www.0073.com | www.5446pp.com | www.ljw032.com | 3103.com | js07749.com | 68228m.com | www.ascp3.com | www.1678.cc | www.938d.cc | www.h7788e.com | 3522jj.com | 38365t.com | 23800r.com | www.976731.com | www.8998833.com | www.58665b.com | www.55268ss.com | 44077o.com | www.28850.com | www.888dsy.com | www.hg00895.com | yhguangxi.vip | 9694d.com | 97799k.com | www.326675.com | www.6661d.cc | www.9989579.com | www.9737cc.me | www.b444.com | www.5651e.com | 3202s.com | 346770.com | 9679o.com | 3678qq.com | www.763526.com | www.89894q.com | www.60886h.com | www.56655g.com | www.vns8970.com | www.un333.com | ued.bet | 4261.com | 060nnn.com | 3473p.com | 4809c.com | www.xinyc6.com | www.3552e.com | www.3157s.com | 3568t.com | 878hg.com | g3144.com | 9789886.com | www.606684.com | www.5522j.cc | www.50051p.com | www.6678696.com | www.30350p.com | www.gt111666.com | www.d32939.com | www.kais8.com | www.9679o.com | www.8767700.com | 97799x.com | 168cp-u.com | hubo8.cc | 51133dd.com | 5099uu.com | 047107.com | 7003f.com | mgm.tt | www.171109.com | www.649677.com | www.c5235.com | www.8839e.com | www.2655268.com | www.5287.com | www.97828u.vip | www.460017.com | 2146v.com | 5504p.com | agaa29.com | ff1331.com | 2757x.com | zhcp17.com | 4638866.com | 56988e.vip | 4809f.com | bjqxgs.com | 54549955.com | feicai0953.com | 89892.com | 4js345.com | 228888k.com | 9949n.com | www35.vip | 1389o.com | 7726ooo.com | 1234vn.cc | 31325y.com | f2850.com | 8381ss.com | 11422.cc | a2848.com | 2172288.com | 444167.com | 3788gg.com | 4156.com | 35hh.vip | 1665cc.com | www.s1128.com | 4233.com | 354221.com | hd11939.com | 9895a.com | 7380jj.com | 57157s.com | 496.bet | 588fff.cc | www.1869i.com | www.943a29.com | www.v15501.com | www.56992.com | www.111ee9.com | www.h32939.com | www.9895l.com | www.52062v.com | www.js02347.com | www.80767m.com | www.7qxc.com | www.444539.com | 4233.com | hc9096.com | 4270nn.com | mg887788.com | 1592m.com | www.4107k.com | www.988505.com | www.4963t.com | www.0099psb.com | www.7714g.com | www.df39.com | ncw060.com | www.1764z.com | www.28850.com | www.66376z.com | www.917233.com | 38989u.com | xpj677h.com | 2636.cc | 66p88.cc | www.alpk33.com | www.9997068.com | www.4963dd.com | www.798343.com | www.21202t.com | www.584911.com | 3258e.com | 6008590.com | 1yi.com | 7894i.com | www.yinhennnn.com | www.811129.com | www.5446i.com | www.07163j.com | www.426667.com | 01234rr.com | 447.com | 55818h.com | www.9679d.com | www.rg777.com | www.ww.68203e.com | www.hczx4.com | www.80767o.com | ambjld.com | 68228v.com | 316q.cc | 3775q.com | 4809l.com | www.792suncity.com | www.bscpjj.com | www.1764a.com | www.gocp2.com | 433yh.com | 37688g.com | 22556m.com | www.306444a.com | www.9895a.com | www.41518w.com | www.377507.com | 2267z.com | 44hh8332.com | www.6655288.com | www.770309.com | www.hx6686.com | 21866f.com | 01234ss.com | www.066116.com | www.20199ll.com | www.3978e.com | www.226065.com | 38738733.com | 28839q.com | www.23427q.com | www.yuehengsz.com | 33oo8332.com | 6641ww.com | www.c063801.com | www.53900a.com | feicai0415.com | www.4212z.com | www.6555567.com | www.c773776.com | 3544v.com | www.63877g.com | www.99094i.com | vns8d.com | www.dfs997.com | www.285628.com | 89892bb.com | 176939.com | www.js68678.com | 6446tt.com | 5478e.com | www.xpj66123.com | 80567n.com | www.hg24500.com | www.35898b.com | 2078v.com | www.6199b.com | www.39500j.com | 2267w.com | www.k1876.com | www.gei30.com | 2214bb.com | www.d948d.com | www.579031.com | dzc222.com | www.4058qq.com | 32126q.net | www.882236f.com | www.5856882.com | 4023r.com | www.8814e7.com | www.08588l.com | 99662007.com | www.466698.com | www.3116j.com | www.330587.com | 2677xxx.com | www.4809a.com | 1389ff.com | www.1596d.com | www.hy6937.com | 78115577.com | www.4996xa.com | 3434rrr.com | www.5557888.com | www.25688j.com | ii4119.com | www.301393.com | zyxxd.com | www.373xpj.com | www.76520y.com | hgcn.com | www.7415j.com | 73999w.com | www.88837p.com | www.qucw5.com | n888699.com | www.75600y.com | 7335g.com | www.hg7857.com | www.345512.com | www.70398.com | www.41518l.com | 3788mm.com | www.64566d.com | 4022w.com | www.77958.com | www.550637.com | 73999g.com | www.00840a.com | 4165.com | zg163.net | www.5856857.com | 50099c.com | www.sb5506.com | 86611m.com | www.111153.com | www.150961.com | www.tushan38.com | www.901375.com | 33115.com | www.60108d.com | qq00558.com | www.333xx.cc | 13377a.com | www.4196u.com | 4152x.com | www.tyc748.com | 3482h.com | www.zs5555.com | 132ag88.com | www.hai0000.com | www.371957.com | www.22xpjdc.com | www.900845.com | www.b67783.com | www.1368u.cc | 67888.am | www.22qxc.com | u2649.com | www.07163x.com | 0080x.com | www.80767q.com | 8666.hk | www.55766.com | w88u65.com | www.aobo196.com | 6665009.com | www.82439.com | 84490.com | www.7777wns.com | www.1035k.com | 55vn77.com | www.1035h.com | 5647l.com | www.ya066.com | www.6248j.com | www.971291.com | www.9374o.com | www.587991.com | www.67797x.com | www.366098.com | www.25288u.com | www.rcw321.com | www.242365.com | 0234oo.com | www.661666.com | hg999333n.com | www.jl708.com | 23800t.com | www.eee2848.com | www4165.com | www.ribo12.cc | 9101901.com | www.7782a.com | js75c.com | www.725106.com | www.88807w.com | P35ss.com | www.h1765.com | yin076.com | www.46630.info | mmm01234.com | www.96386p.com | hg91668.com | www.662358.com | www.hg726.com | 2381uu.com | www.7415e.com | yth005.net | www.hg3006.tw | www.178012.com | www.995l.net | 7744ppp.com | www.15223.com | mg437711.com | www.0270f.com | 38989o.com | www.496918.com | www.4965b.com | 2267b.com | www.0600r.cc | oo56988.com | www.760557.com | www.09323.cc | 8898444.com | www.8577.com | d2894.com | www.582993.com | www.pj5504.com | 1596bb.com | www.559999.vip | 6220vv.com | www.567306.com | www.79111.com | ss76669.com | www.17jsc.com | 9030s.com | www.345897.com | www.www904744.com | 998n.cc | www.hg3155.com | www.pj5908.com | 1859005.com | www.848777l.com | 70118r.com | www.989447.com | www.pj9793.com | 7240z.com | www.tyc88555.com | www.323006.com | 5003qq.com | www.85155.com | www.79800a.com | www.021700.com | 3640ww.com | www.1368d.cc | www.js60044.com | 6002s.com | www.71233f.com | www.2211sb.com | 3775x.com | www.4833022.com | www.28758f.com | 3049u.com | www.586806.com | www.pj8585.com | 73999y.com | www.7920h.com | www.666xin2.com | 88946000.com | www.hr1222.com | www.wns8818.com | 2595r.com | www.yh6699.bet | www.m.kb88.com | q47479.com | www.js07678.com | www.67797u.com | 71366l.com | www.41518d.com | www.ssb999.com | 2941122.com | www.wo41.com | www.pj6667.com | 73055b.com | www.401285.com | www.k32939.com | 8290f.com | 61320077.com | www.984701.com | www.338808.com | 5350.com | www.022sc.cc | www.pj1985.com | ca8033.com | www.062766.com | www.dingxin598.com | www.357173.com | www.56730.cc | www.pj5902.com | 55331bb.com | www.35918p.com | www.4583.com | 28288aa.com | 87965ee.com | www.1434k.com | www.00618y.com | 998n.cc | www.775720.com | www.4078u.com | www.033033r.com | h7454.com | www.2350w.com | www.56655j.com | 0434322.com | 2805v.com | www.26299l.com | www.377977.com | 2127a.com | 2649g.com | www.7239g.com | www.pj55585.com | k353.com | 3822u.com | www.39500k.com | www.drf0561.com | 2019k.cc | xx38648.cc | www.2373p.com | www.245684.com | dafa7575.com | 5099hh.com | www.673290.com | www.4546400.com | www.55268yy.com | 4255dd.com | www.62118e.com | www.25809.com | www.66442.com | 56988r.vip | 33382c.com | www.987436.com | www.c80288.com | www.k22365.com | www.971291.com | www.98698h.com | www.38200z.com | 8988.com | 32424b.com | www.81678k.com | www.27363t.com | www.ylg0099.com | 7893w17.com | www.139670.com | www.98478.com | www.suncity9898.com | 44995002.com | 9063555.com | www.178192.com | www.xy52.vip | www.w456x.com | www.7720s.com | 9068i.com | 6868-a.cc | www.0014f.com | www.678js777.com | www.221155.com | 500000515.com | 626920.com | www.541611.com | www.hd8672.com | www.hc3301.com | www.709899.com | 67890aa.com | ojk238.com | www.976821.com | www.0044sun.com | www.666549.com | 6hg5588.com | 8668099.com | 9949e.com | www.c1393.com | www.12345606.cc | www.jinniu00.com | www.lpj789.com | 4426234.com | 3550f.com | www.666405.com | www.xb88kk.com | www.389249.com | www.330099y.com | 6868bb.cc | 9rui8888.com | feicai0580.com | www.987436.com | www.0343d.com | www.k9478.com | www.390722.com | 67877s.com | 9101908.com | 2381mmm.com | www.959591.com | www.6678697.com | www.j3065.com | www.xg0088z.com | 3656gg.com | 4255vvv.com | ff555o.com | 9958900.com | www.c2809.com | www.226467.com | www.59040.com | www.23488v.com | www.7009844.com | 56787hh.com | 2004877.com | 2355d.com | www.312522.com | www.2875w.com | www.hg77701.com | www.77775309.com | www.6677104.com | www.77788806.com | 56988d.vip | 32212m.com | 2998r.com | 2018bet33.com | www.485648.com | www.3890w.com | www.hg1115.com | www.5981a.com | www.hg6898.com | www.777444m.com | 5004jj.com | 8522ssss.com | 3778jj.com | 4812a.com | 1429m.com | www.80767e.com | www.701574.com | www.3552f.com | www.js69.com | www.52062l.com | www.848777e.com | www.70678d.com | www.34557.com | www.223456o.com | 081753.com | yinhebp.com | 4129.com | 341pt.com | hg8081.com | 1305004.com | 500000938.com | www.68568u.com | www.578860.com | www.881799a.com | www.35231.com | www.308005.com | www.4569.am | www.69567o.com | www.biying960vip.com | www.xlcp.com | www.sk22222.com | www.289333.com | www.js778911.com | www.a4568.com | www.483828.com | www.9464hh.com | 4694c.com | 55818y.com | hd6766.com | 496.bet | 08159h.com | 5003hh.com | hhvip666.com | y7064.com | 3404g.cc | 2021e.com | t8009.com | 78117711.com | 6220nn.com | 500000798.com | byj.com | 3301800.com | 7720796.com | amhg033.com | js6780.com | i1915i.com | bet12306420.com | 51133hhh.com | 61324499.com | 86811mm.com | pj223322.com | 8299138.com | 1294z.cc | 22098t.com | 4488g.com | 4018ff.com | 2096u.com | 25288s.com | 30006b.com | 3016ccc.com | www.k88891.com | www.0099hg.com | www.vnsr900.com | www.76543h.com | www.6677msc.com | www.hg130.com | www.tyc112.com | www.342488.com | www.msc128.com | www.50999.com | www.4136.com | www.ag3366.com | www.56011m.com | www.6889791.com | www.574119.com | www.51515k.com | www.6832g.com | www.c6121.com | www.606694.com | www.810517.com | www.371680.com | yin3434.com | 73999a.com | 4637788.com | 28288gg.com | 4189.com | 6118j.com | 7js345.com | www.32126l.net | www.111021.com | www.ks1381.com | www.55545n.com | www.xpj7.net | www.7434b.com | www.5086p.com | www.718568.com | www.001837.com | 88304k.com | pj88ll.com | 4488o.com | 2267n.com | www.ven0000.com | www.33js11.com | www.22557t.com | www.5981i.com | www.qiji111.com | www.53900n.com | www.874918.com | www.97655o.com | z32365.com | 0715563.com | 8569811q.com | 55984s.com | www.77ff940.com | www.hgw3300.com | www.t1432.com | www.4331i.com | www.ya018.com | www.309388.com | 56988n.com | 7686l.com | 2776l.com | www.bet3651114.com | www.350558.com | www.9737aa.com | www.68993257.com | www.dan70.com | www.188932.com | 3467u.com | dzj112.com | 3136ll.com | www.67797w.com | www.333010.com | www.79095k.com | www.50080z.com | www.607335.com | 73999b.com | 0208kk.com | zhcp05.com | www.995q.net | www.cp67775.com | www.8866kcd.com | www.7793b.com | www.187516.com | 3232394.com | 3614b.com | www.4759pp.com | www.mm7777.com | www.30350t.com | www.18005.com | www.183209.com | 1479o.com | h88.com | www.77vn777.cc | www.tw7788.com | www.u98478.com | www.975559.com | hg999333t.com | rr3336.com | 4546vip9.com | www.4887555.com | www.99552nn.com | www.686vv.com | 8827iii.com | 0729e.com | 1327z.com | www.5349.com | www.yy888.cc | www.819847.com | 131s.net | 7720t.com | www.2899msc.com | www.848777o.com | www.50051r.com | www.88266o.com | 333hg.com | 47300.com | www.5860x.com | www.6787758.com | www.636550.com | yd12308.com | 3136oo.com | www.68003.com | www.0600x.cc | www.845755.com | bcylc88.com | 44hh8332.com | www.130031.com | www.32031v.com | www.959581.com | 55332007.com | 392568.com | www.hg7211z.com | www.221313.com | www.591733.com | yl66yl11.com | cc2649.com | www.000amdc.com | www.js338.cn | www.51515p.com | 8344999.com | www.q22365.com | www.47506p.com | www.901758.com | 0969.com | 1119193.com | www.xy048.com | www.3933i.cc | 31325a.com | 8030d.com | www.178tyc.com | www.76520s.com | 3089u.com | df8z.com | www.858448.com | www.66652d.com | 47749a.com | 3156rrr.com | www.32208d.com | www.60108l.com | 99wb8.com | 11989s.com | www.2y933.com | www.27280.cc | 15a27.net | 69990c.com | www.ee55826.com | www.ya238.com | 4018b.com | www.76060c.com | www.hg31118.com | www.503990.com | 992222w.com | www.9679i.com | www.x666678.com | 88904141.com | nn500h.com | www.hjcp7.com | www.gai06.com | 898v.com | www.h7788h.com | www.f94600.com | 38989s.com | 00kk8331.com | www.c44zz.com | www.ck9393.com | 80567e.com | www.3941177.com | www.bet365yazhou.com | xpj55555.vip | mgm3242m.com | www.v88131.com | www.541611.com | 4018ss.com | www.003344.cc | www.9356d.com | v21148.com | www.4972nn.com | www.ykylc09.com | 51335m.com | qpby66.com | www.280.cc | www.50064e.com | 69111a.com | www.99113c.com | www.621410.com | yabo4303.com | www.025sunbet.com | www.66fzc.com | bet577.com | www.3775677.com | www.33112q.com | 3846u.com | www.32666k.com | www.83033m.com | 1137.com | www.88807b.com | www.3zq02.com | 0823.com | www.00618w.com | www.c387387.com | 8000524.com | www.7979w.net | www.91233n.com | 18438o.com | www.84898v.com | www.33997t.com | 1775s.com | www.xf01.com | www.flcb1.com | 5856kk.com | www.hg531.com | www.676944.com | am9649.com | www.98698t.com | www.175221.com | 818132.com | www.44118p.com | 5558940.com | www.ts11888.com | www.9646p.com | 59599p.com | www.107898.com | www.27czj.com | 3846eee.com | www.331194.com | www.167090.com | 7004.am | www.23456789.pw | 5589q.com | www.91990a.com | www.3933l.cc | 82365d.com | www.cai73.cc | www.083039.com | gbhs999.com | www.506930.com | 5003ttt.com | www.645suncity.com | www.aobo196.com | 6220nn.com | www.3306132.com | www.659477.com | 99151v.com | www.519095.com | 62033.com | www.00755.com | www.11554.cc | 3614u.com | www.99113a.com | 8203ccc.com | www.wn869.com | www.77114y.com | 47470524.com | www.109960.com | 10050537.com | www.yh7777.cc | www.23579b.com | 3788.red | www.9737qq.com | 8036a.com | www.3459c.com | www.071wy.com | 3416p.com | www.4136r.com | 52599q.com | www.365815d.com | www.2350p.com | 68228v.com | www.js89u.vip | 1483.com | www.a80070.com | www.763227.com | 3522gg.cc | www.4923p.com | ii4119.com | www.1559508.com | 0245e.com | www.3691t.com | www.339968.com | www.63260.com | www.60007b.com | eee1915.com | www.b3410.com | 1168a.com | www.188448.com | www.188975.com | www.yh77899.com | www.slyl4.com | 55899g.com | www.7375.com | 4763.com | www.js89u.vip | x2.cc | www.8967u.com | 500000531.com | www.30370000.com | www.507933.com | www.hg6513.com | www.zcwf0.com | 8827gg.com | www.js520988.cn | 3788h.com | www.hv99365.com | 4880i.com | www.5446ll.com | 11173355.com | www.3846k.com | hg11788.com | www.51153.com | www.60108o.com | www.b922.com | www.388634.com | www.yh8877.cc | www.786126.com | www.c50336.com | www.ya658.com | f3144.com | www.37439.cc | 4023z.com | www.bet63.com | 998k.cc | www.ya2019t.com | 6868269.com | www.50wb.top | 496gg.com | www.35898c.com | 40033e.com | www.a2418.com | 32689.com | www.fg9903.com | 46474647.com | www.w77929.com | 8884168.com | www.8887sy.com | 6665009.com | www.97655c.com | 486.cc | www.96386d.com | 33115ww.com | www.7793k.com | 4123yy.com | www.c6092.com | www.pjshandong.com | www.511059.com | www.32666x.com |