tailieunhanh - Using SQL phần 1

Using SQL SQL (pronounced sequel) is the standard language for accessing relational databases. As you'll see in this chapter, SQL is easy to learn and use | Using SQL SQL pronounced sequel is the standard language for accessing relational databases. As you ll see in this chapter SQL is easy to learn and use. With SQL you tell the database what data you want to access and the database software figures out exactly how to get that data. There are many types of SQL statements but the most commonly used types of SQL statements are these Data Manipulation Language DML statements Data Definition Language DDL statements DML statements allow you to retrieve add modify and delete rows stored in the database. DDL statements allow you to create database structures such as tables. Before you learn the basics of DML statements you need to know how you can enter and run SQL statements. You can enter and run SQL statements against a SQL Server database using the Query Analyzer tool and you ll learn about this next. Note As you ll see later in the Accessing a Database Using Visual Studio .NET section you can also use Visual Studio .NET to create SQL statements. Visual Studio .NET enables you to create SQL statements visually as well as entering them manually. Using Query Analyzer You use Query Analyzer to enter and run SQL statements. You start Query Analyzer by selecting Start Microsoft SQL Server Query Analyzer. In the following sections you ll learn how to connect to a SQL server instance enter and run a SQL statement save a SQL statement and load one. Connecting to a SQL Server Instance When you start Query Analyzer the first thing it displays is the Connect to SQL Server dialog box as shown in Figure . In the SQL Server field you enter the name of the SQL Server instance to which you want to connect. You can click the drop-down list and select an instance of SQL Server or you can click the ellipsis button three dots . to the right of the drop-down list to display a list of SQL Server instances running on your network. Figure Connecting to a SQL Server database If you select the Windows authentication radio button then SQL .

TÀI LIỆU LIÊN QUAN
10    158    1
6    184    1
7    162    1
5    157    1
6    160    1
6    152    1
6    150    1
6    206    1
7    154    1
5    121    1