O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding New Data with INSERT

You can enter new data into the database by using the INSERT SQL statement. The syntax of the command is fairly simple. However, before building the query to add new data, you must know the schema of the table. Figure 3.2 shows the schema of the Categories table in the Northwind database.

Figure 3.2. The Microsoft SQL Enterprise Manager can display the schema of your database to help you build queries.

Notice that the table consists of four fields, including the CategoryID column. This field contains an integer that is automatically incremented for each new record added; we will not need to add a value with our query. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required