Beginning ASP.NET 3.5 in C# 2008 From Novice to Professional Second Edition(ASP.NET 3.5(C#2008)入门 )翻译-第十章(5)

本文介绍了使用ADO.NET进行数据库操作时所需了解的SQL基础知识,包括SQL的四种基本操作:SELECT检索记录、UPDATE修改记录、INSERT添加记录及DELETE删除记录。此外还提供了进一步学习SQL的资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


SQL Basics SQL 基础

When you interact with a data source through ADO.NET, you use SQL to retrieve, modify, and update information. In some cases, ADO.NET will hide some of the details for you or even generate required SQL statements automatically. However, to design an efficient database application with a minimal amount of frustration, you need to understand the basic concepts of SQL.

当你通过ADO.NET与一个数据源交互,您使用SQL来检索,修改和更新信息。在某些情况下, ADO.NET将隐藏的一些细节,甚至自动生成所需的SQL语句。然而,用最少的挫折设计一个有效的数据库,你需要了解SQL的基本概念。

SQL (Structured Query Language) is a standard data access language used to interact with relational databases. Different databases differ in their support of SQL or add other features, but the core commands used to select, add, and modify data are common. In a database product such as SQL Server, it’s possible to use SQL to create fairly sophisticated SQL scripts for stored procedures and triggers (although they have little of the power of a full object-oriented programming language). When working with ADO.NET, however, you’ll probably use only the following standard types of SQL statements:

SQL(结构化查询语言)是一种标准的数据存取语言,用来与关系型数据库互动。不同的数据库支持不同的SQL语句或添加其他功能,但用于选择、添加和修改数据的核心命令是共同的。在数据库产品如SQL Server ,很可能使用SQL创建相当复杂的SQL脚本,如存储过程和触发器(尽管他们在面向对象的编程语言中有很少充分的作用)。然而当使用ADO.NET时,你可能只使用下列标准类型的SQL语句:

• A Select statement retrieves records.

• An Update statement modifies existing records.

• An Insert statement adds a new record.

• A Delete statement deletes existing records.

• SELECT语句检索记录。     

•Update语句修改现有记录。     

•INSERT语句增加一个新的纪录。     

•Delete语句删除现有记录。

If you already have a good understanding of SQL, you can skip the next few sections. Otherwise, read on for a quick tour of SQL fundamentals.

如果您已经对SQL有一个很好的了解,你可以跳过下几节。 否则,快速浏览SQL的基础。

Tip To learn more about SQL, use one of the SQL tutorials available on the Internet, such as the one at http://www.w3schools.com/sql. If you’re working with SQL Server, you can use its thorough Books Online help to become a database guru.

提示:若要了解更多有关SQL ,使用在互联网上提供的SQL教程,如在 http://www.w3schools.com/sql 。如果使用SQL Server ,您可以使用它的在线帮助,将使您成为一个数据库大师。
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值