【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)

上传人:从****越 文档编号:126767184 上传时间:2020-03-27 格式:DOCX 页数:25 大小:753.03KB
返回 下载 相关 举报
【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)_第1页
第1页 / 共25页
【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)_第2页
第2页 / 共25页
【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)_第3页
第3页 / 共25页
【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)_第4页
第4页 / 共25页
【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)_第5页
第5页 / 共25页
点击查看更多>>
资源描述

《【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)》由会员分享,可在线阅读,更多相关《【精品文档】521关于计算机专业结构化查询语言sql查找的毕业设计论文英文英语外文文献翻译成品资料:使用SQL进行数据库查询(中英文双语对照)(25页珍藏版)》请在金锄头文库上搜索。

1、本文是中英对照毕业设计论文外文文献翻译,下载后无需调整复杂的格式直接可用!一辈子也就一次的事!文献引用作者出处信息: Diane_Zak,Database Queries with SQL Programming with Microsoft Visual Basi,2019:550-585 (如觉得年份太老,可改为近2年,毕竟很多毕业生都这样做)英文3526单词,20361字符(字符就是印刷符),中文5774汉字。(如果字数多了,可自行删减,大多数学校都是要求选取外文的一部分内容进行翻译的。)Database Queries with SQLFOCUS ON THE CONCEPTS LES

2、SONConcepts covered in this lesson: F-1 SELECT statement F-2 Creating a query F-3 Parameter queries F-4 Saving a query F-5 Invoking a query from codeF-1 SELECT StatementThe most commonly used statement in Structured Query Language, or SQL, is the SELECT statement. You use the SELECT statement to cre

3、ate database queries. As you learned in Chapter 11, a database query, often referred to more simply as a query, is a statement that allows you to retrieve specific information from a database. For example, you can use a query to specify the fields and records you want either to display or to use in

4、a calculation. The basic syntax of the SELECT statement is shown in Figure 12-1 along with some of the operators that can be included in the WHERE clauses condition. Capitalizing the boldfaced keywords in a SELECT statement is optional; however, many programmers do so for clarity.In the syntax, fiel

5、dList is one or more field names separated by commas, and table is the name of the table containing the fields. The WHERE and ORDER BYclauses are optional parts of the syntax. You use the WHERE clause, which contains a condition, to limit the records you want to retrieve. Similar to the condition in

6、 the If.Then.Else and Do.Loop statements, the condition in a WHERE clause specifies a requirement that must be met for a record to be selected. The ORDER BY clause is used to arrange the records in either ascending (the default) or descending order by one or more fields. Figure 12-2 shows examples o

7、f using the SELECT statement to query the Winners table in the Oscars.mdf database.Notice that the word Argo in Example 3 appears in single quotes, but the number 2014 in Example 2 does not. The single quotes around the value in the WHERE clauses condition are necessary only when you are comparing a

8、 field that contains text with a literal constant. The single quotes are not necessary when you are comparing a numeric field with a literal constant. Text comparisons in SQL are not case sensitive. Therefore, the WHERE clause in Example 3 can also be written as WHERE Pi c t ur e = a r go .In Exampl

9、e 4, the SELECT statements WHERE clause contains the SQL LIKE operator along with the % (percent sign) wildcard, which represents zero or more characters. The statement tells the computer to select the Year and Picture fields for records whose Picture field begins with the word “The”followed by a sp

10、ace and zero or more characters. The LIKE operator can also be used with the 2 (underscore) wildcard, which represents one character.The WHERE clause in Example 5s SELECT statement contains the OR operator. The clause tells the computer to select the specified fields for any record whose Year field

11、contains either 2010 or 2015. The ORDER BYclause in the statement arranges the selected records in descending order by the Year field.F-2 Creating a QueryIn this section, you will use the Query Builder dialog box, which you learned about inChapter 11, to create queries for the examples shown in Figu

12、re 12-2. The queries will allow you to observe the way the SELECT statements in those examples retrieve the desired fields and records from the database.To create queries for the examples in Figure 12-2:1.Open the Oscars Solution.sln file contained in the VB2017Chap12Oscars Solution-SELECT folder. O

13、pen the designer and Solution Explorer windows. The Oscar Winners application is already connected to the Oscars.mdf database, and the OscarsDataSet is already created.2.Start the application. The OscarsDataSet contains the 10 records shown in Figure 12-3.3.Click the Exit button. Right-click OscarsD

14、ataSet.xsd in the Solution Explorer window. The .xsd file, called the datasets schema file, contains information about the tables, fields, records, and properties included in the OscarsDataSet. Click Open to open the DataSet Designer window. See Figure 12-4.4.Right-click WinnersTableAdapter in the D

15、ataSet Designer window. Point to Add on the shortcut menu and then click Query. (If Add does not appear on the shortcut menu, click Add Query instead.) Doing this starts the TableAdapter Query Configuration Wizard. The Use SQL statements radio button should be selected on the Choose a Command Type s

16、creen, as shown in Figure 12-5.5.Click the Next button to display the Choose a Query Type screen. Verify that the “SELECT which returns rows” radio button is selected.6.Click the Next button to display the Specify a SQL SELECT statement screen. The “What data should the table load?” box contains the default query, which selects all of the fields and records from the table. See Figure 12-6. The defau

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 学术论文 > 期刊/会议论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号