嵌入式SQL编程材料

  • d1_247745
    了解作者
  • 1.8MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-26 11:26
    上传日期
详细讲解嵌入式SQL语言编程,简单易学,以ppt形式展现在读者面前,是读者眼前一亮,更感兴趣,更加简单易学
嵌入式SQL编程材料.rar
  • 嵌入式SQL编程材料
  • 嵌入式SQL_学生程序
  • studentmanager.pc
    8.4KB
  • 嵌入SQL_ppt
  • 嵌入式SQL实例
  • vc60.pdb
    52KB
  • student.cpp
    15.3KB
  • student.obj
    7.9KB
  • student.pdb
    417KB
  • student.pc
    681B
  • student.exe
    164.1KB
  • oracle与VC
  • 常用Oracle网址和预编译.ppt
    1.3MB
  • Oracle预编译与VC6.0.ppt
    56.5KB
  • esql_001.doc
    28KB
  • 存储过程.ppt
    781KB
  • 第8章嵌入SQL.ppt
    367.5KB
  • oracle存储过程触发器应用.ppt
    55.5KB
  • 嵌入式SQL作业
  • studentmanager.pc
    5KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/629a49a36c497022d711db95/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/629a49a36c497022d711db95/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">#include &lt;<span class="fc2 sc0">s</span><span class="fc2 sc0">tdio.h&gt;</span></div><div class="t m0 x1 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">#include &lt;<span class="fc2 sc0">s</span><span class="fc2 sc0">tr</span><span class="fc2 sc0">ing</span><span class="fc2 sc0">s</span><span class="fc2 sc0">.h</span><span class="fc2 sc0">&gt;</span></div><div class="t m0 x1 h2 y3 ff1 fs0 fc0 sc0 ls0 ws0">#include &lt;<span class="fc2 sc0">s</span><span class="fc2 sc0">q</span><span class="fc2 sc0">l</span><span class="fc2 sc0">c</span><span class="fc2 sc0">a</span><span class="fc2 sc0">.h</span><span class="fc2 sc0">&gt;</span></div><div class="t m0 x1 h2 y4 ff1 fs0 fc0 sc0 ls0 ws0">#include &lt;<span class="fc2 sc0">s</span><span class="fc2 sc0">qlc</span><span class="fc2 sc0">pr</span><span class="_ _0"></span><span class="fc2 sc0">.h&gt;</span></div><div class="t m0 x1 h2 y5 ff1 fs0 fc0 sc0 ls0 ws0">int main() </div><div class="t m0 x1 h2 y6 ff1 fs0 fc0 sc0 ls0 ws0">{ </div><div class="t m0 x2 h3 y7 ff2 fs0 fc1 sc0 ls0 ws0">//</div><div class="t m1 x3 h4 y7 ff3 fs1 fc1 sc1 ls0 ws0">&#24314;&#31435;&#25968;<span class="fc2 sc0">&#25454;</span><span class="fc2 sc0">&#24211;&#36830;&#25509;</span></div><div class="t m0 x1 h2 y8 ff1 fs0 fc0 sc0 ls0 ws0"> exec sql c<span class="fc2 sc0">onn</span><span class="fc2 sc0">e</span><span class="fc2 sc0">c</span><span class="fc2 sc0">t</span><span class="fc2 sc0"> </span><span class="fc2 sc0">: </span><span class="fc2 sc0">"</span><span class="fc2 sc0">s</span><span class="fc2 sc0">ys</span><span class="fc2 sc0">t</span><span class="fc2 sc0">e</span><span class="fc2 sc0">m</span><span class="_ _1"></span><span class="fc2 sc0">"</span></div><div class="t m0 x4 h2 y9 ff1 fs0 fc0 sc0 ls0 ws0"><span class="fc2 sc0">ide</span><span class="fc2 sc0">ntif</span><span class="fc2 sc0">i</span><span class="fc2 sc0">e</span><span class="fc2 sc0">d</span><span class="fc2 sc0"> </span><span class="fc2 sc0">by:</span><span class="fc2 sc0"> </span><span class="fc2 sc0">"1</span><span class="fc2 sc0">234"</span></div><div class="t m0 x1 h2 ya ff1 fs0 fc0 sc0 ls0 ws0"> usin<span class="fc2 sc0">g </span><span class="fc2 sc0">: </span><span class="fc2 sc0">"mydb"</span><span class="fc2 sc0"> </span><span class="fc2 sc0">; </span><span class="fc2 sc0"> </span></div><div class="t m0 x1 h2 yb ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2 fc1">//</span></div><div class="t m1 x5 h4 yb ff3 fs1 fc1 sc1 ls0 ws0">&#24314;&#31435;</div><div class="t m0 x6 h3 yb ff2 fs0 fc1 sc0 ls0 ws0">SQ<span class="fc2 sc0">L</span></div><div class="t m1 x7 h4 yb ff3 fs1 fc1 sc1 ls0 ws0"><span class="fc2 sc0">&#36890;&#20449;&#21306;</span></div><div class="t m0 x1 h2 yc ff1 fs0 fc0 sc0 ls0 ws0"> exec sql i<span class="fc2 sc0">n</span><span class="fc2 sc0">c</span><span class="fc2 sc0">lude</span><span class="fc2 sc0"> </span><span class="fc2 sc0">s</span><span class="fc2 sc0">qlc</span><span class="fc2 sc0">a</span><span class="fc2 sc0">; </span></div><div class="t m0 x1 h2 yd ff1 fs0 fc0 sc0 ls0 ws0"> <span class="ff2 fc1">//</span></div><div class="t m1 x5 h4 yd ff3 fs1 fc1 sc1 ls0 ws0">&#35774;&#23450;&#20027;<span class="fc2 sc0">&#21464;&#37327;</span></div><div class="t m0 x1 h2 ye ff1 fs0 fc0 sc0 ls0 ws0"> exec sql b<span class="fc2 sc0">e</span><span class="fc2 sc0">g</span><span class="fc2 sc0">in </span><span class="fc2 sc0">de</span><span class="fc2 sc0">c</span><span class="fc2 sc0">la</span><span class="fc2 sc0">r</span><span class="fc2 sc0">e</span><span class="fc2 sc0"> </span><span class="fc2 sc0">s</span><span class="fc2 sc0">e</span><span class="fc2 sc0">c</span><span class="fc2 sc0">t</span><span class="fc2 sc0">ion;</span></div><div class="t m0 x1 h2 yf ff1 fs0 fc0 sc0 ls0 ws0"> char giv<span class="fc2 sc0">e</span><span class="fc2 sc0">n</span><span class="fc2 sc0">s</span><span class="fc2 sc0">no[</span><span class="fc2 sc0">1</span><span class="fc2 sc0">0</span><span class="fc2 sc0">]</span><span class="fc2 sc0">;</span></div><div class="t m0 x1 h2 y10 ff1 fs0 fc0 sc0 ls0 ws0"> char v_<span class="fc2 sc0">na</span><span class="fc2 sc0">m</span><span class="fc2 sc0">e</span><span class="fc2 sc0">[</span><span class="fc2 sc0">20</span><span class="fc2 sc0">]</span><span class="fc2 sc0">;</span></div><div class="t m0 x1 h2 y11 ff1 fs0 fc0 sc0 ls0 ws0"> int v_ag<span class="fc2 sc0">e</span><span class="fc2 sc0">; </span><span class="fc2 sc0"> </span><span class="fc2 sc0"> </span></div><div class="t m0 x1 h2 y12 ff1 fs0 fc0 sc0 ls0 ws0"> exec sql e<span class="fc2 sc0">nd</span><span class="fc2 sc0"> </span><span class="fc2 sc0">de</span><span class="fc2 sc0">c</span><span class="fc2 sc0">l</span><span class="fc2 sc0">a</span><span class="fc2 sc0">r</span><span class="fc2 sc0">e</span><span class="fc2 sc0"> </span><span class="fc2 sc0">s</span><span class="fc2 sc0">e</span><span class="fc2 sc0">c</span><span class="fc2 sc0">tion</span><span class="fc2 sc0">;</span></div><div class="t m0 x1 h2 y13 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="c x8 y14 w2 h5"><div class="t m0 x9 h2 y15 ff1 fs0 fc0 sc0 ls0 ws0"> </div></div><div class="t m0 xa h3 y1 ff2 fs0 fc1 sc0 ls0 ws0">//</div><div class="t m1 xb h4 y1 ff3 fs1 fc1 sc1 ls0 ws0">&#36755;&#20837;&#23398;&#21495;</div><div class="t m0 xc h6 y2 ff1 fs0 fc0 sc0 ls0 ws0">printf("<span class="ff3">&#35831;&#36755;&#20837;&#23398;&#21495;</span>: "); </div><div class="t m0 xc h2 y3 ff1 fs0 fc0 sc0 ls0 ws0">gets(givensno); </div><div class="t m0 xc h2 y16 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 xa h3 y17 ff2 fs0 fc1 sc0 ls0 ws0">//</div><div class="t m1 xb h4 y17 ff3 fs1 fc1 sc1 ls0 ws0">&#20174;&#34920;&#20013;&#26597;&#35810;&#20449;&#24687;&#24182;&#25918;&#21040;&#21464;&#37327;&#20013;</div><div class="t m0 xd h3 y17 ff2 fs0 fc1 sc0 ls0 ws0"> </div><div class="t m0 xc h2 y18 ff1 fs0 fc0 sc0 ls0 ws0">exec sql select sname,<span class="_ _1"></span> sage</div><div class="t m0 xa h2 y19 ff1 fs0 fc0 sc0 ls0 ws0"> into :v_name, :v_age </div><div class="t m0 xa h2 y1a ff1 fs0 fc0 sc0 ls0 ws0"> from student </div><div class="t m0 xa h2 y1b ff1 fs0 fc0 sc0 ls0 ws0"> where sno = :givensno;</div><div class="t m0 xa h3 y1c ff2 fs0 fc1 sc0 ls0 ws0">//</div><div class="t m1 xb h4 y1c ff3 fs1 fc1 sc1 ls0 ws0">&#36755;&#20986;&#21464;&#37327;&#30340;&#20540;</div><div class="t m0 xc h6 y1d ff1 fs0 fc0 sc0 ls0 ws0">printf("%s<span class="_ _2"> </span><span class="ff3">&#30340;&#24180;&#40836;&#26159;</span>%d<span class="_ _2"> </span><span class="ff3">&#23681;</span> ",</div><div class="t m0 xa h2 y1e ff1 fs0 fc0 sc0 ls0 ws0"> v_name, v_age); </div><div class="t m0 xa h2 y1f ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 xa h3 y20 ff2 fs0 fc1 sc0 ls0 ws0">//</div><div class="t m1 xb h4 y20 ff3 fs1 fc1 sc1 ls0 ws0">&#20851;&#38381;&#25968;&#25454;&#24211;&#36830;&#25509;</div><div class="t m0 xc h2 y21 ff1 fs0 fc0 sc0 ls0 ws0">Exec sql disconnect "mydb";</div><div class="t m0 xa h2 y22 ff1 fs0 fc0 sc0 ls0 ws0">}</div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐