145.html
来自「Python Ebook Python&XML」· HTML 代码 · 共 75 行
HTML
75 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Robots" content="INDEX,NOFOLLOW">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<TITLE>Safari | Python Developer's Handbook -> Using SQL</TITLE>
<LINK REL="stylesheet" HREF="oreillyi/oreillyN.css">
</HEAD>
<BODY bgcolor="white" text="black" link="#990000" vlink="#990000" alink="#990000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellpadding=5 cellspacing=0 border=0 class="navtopbg"><tr><td><font size="1"><p class="navtitle"><a href="8.html" class="navtitle">Web Development</a> > <a href="0672319942.html" class="navtitle">Python Developer's Handbook</a> > <a href="137.html" class="navtitle">8. Working with Databases</a> > <span class="nonavtitle">Using SQL</span></p></font></td><td align="right" valign="top" nowrap><font size="1"><a href="main.asp?list" class="safnavoff">See All Titles</a></font></td></tr></table>
<TABLE width=100% bgcolor=white border=0 cellspacing=0 cellpadding=5><TR><TD>
<TABLE border=0 width="100%" cellspacing=0 cellpadding=0><TR><td align=left width="15%" class="headingsubbarbg"><a href="144.html" title="ADO (ActiveX Data Objects)"><font size="1">< BACK</font></a></td><td align=center width="70%" class="headingsubbarbg"><font size="1"><a href="popanote.asp?pubui=oreilly&bookname=0672319942&snode=145" target="_blank" title="Make a public or private annnotation">Make Note</a> | <a href="145.html" title="Use a Safari bookmark to remember this section">Bookmark</a></font></td><td align=right width="15%" class="headingsubbarbg"><a href="146.html" title="Python DB API"><font size="1">CONTINUE ></font></a></td></TR></TABLE>
<a href="5%2F31%2F2002+4%3A39%3A21+PM.html" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><font color=white size=1>152015024128143245168232148039199167010047123209178152124239215162147045098086162037036201</font><a href="read3.asp?bookname=0672319942&snode=145&now=5%2F31%2F2002+4%3A39%3A21+PM" TABINDEX="-1"><img src=images/spacer.gif border=0 width=1 height=1></a><br>
<FONT>
<h3>
Using SQL</h3>
<p>
<i>SQL</I> stands for <I>Structured Query Language.</I> It was developed in the mid-1970s by <A name="idx1073745060"></A>IBM Research to serve as an English interface query language to the System R relational database prototype.</P>
<P>SQL consists of a list of powerful and flexible commands that are used to manipulate information collected in tables, by operating and controlling sets of records at a time.</P>
<ul>
<li>
<P>SQL is an interactive query language for <I>ad hoc</I> database queries.</P>
</li>
<li>
<p>SQL is a database programming language.</p>
</li>
<li>
<p>SQL is a data definition and data administration language.</p>
</li>
<li>
<p>SQL is the language of networked database servers.</p>
</li>
<Li>
<p>SQL helps protect the data in a multi-user networked environment.</P>
</li>
</uL>
<p>Nowadays, SQL servers are the dominant model for creating client/server applications. The most important tendency among database servers of any size is the revelation of SQL as the choice for the manipulation, definition, and control of data.</p>
<p>SQL has been an ISO standard for a long time. It is a powerful language for databases that adhered to the relational model.</p>
<P>The relational model clearly separates the physical aspects of data from their logical implementation. It frees you from being concerned with the details of how data is stored and makes the access to data purely logical.</p>
<p>By using SQL statements, you just need to specify the tables, columns, and row qualifiers to get to any data item.</p>
<H4>SQL Mini-Tutorial</H4>
<P>The idea behind this mini-tutorial is to teach you how to change and query the database. Of course, this book does not cover everything. It should give you a brief understanding of the concepts and basic usage of SQL statements. If it becomes necessary to delve deeper in this topic, the last heading of this section contains a list of Web sites that have some beneficial and complete SQL tutorials.<A name="idx1073745061"></A>
<A NAme="idx1073745062"></a>
<a NAME="idx1073745063"></a>
<a naME="idx1073745064"></A>
<A name="idx1073745065"></a>
</p>
<h5>
Selecting the Information</h5>
<p>In a relational database, data is stored in tables. In our example, we have the <tt class="monofont">USERS</tt> Table. <tt ClaSs="monofont">ID, NAME, EMAIL,</tt> and <Tt claSs="monofont">AGE</tt> are the columns of this table.</P>
<P><TAble bORDEr="1" celLSPAcing="0" CELLpadding="1" width="100%">
<caption><h5>Table
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?