Codefixer - ASP tutorials, resources and software
asp.netPRO “Best ASP.NET Host” – DiscountASP.NET
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Tuesday 13 May
MembersPro PayPal - ASP Membership software

ASP.NET 3.5 Hosting – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

SQL explained: What is SQL | Select Statement | Select Where | Insert | Update/Edit | Delete | Order By | Select Between

SQL Insert Statement

The SQL Insert statement is simply used to insert data (add rows) into a database.

Syntax: INSERT INTO TableName (Column1,Column2) VALUES ('Value1','Value2')

TableName is the name of the table you want to insert the data into. Column1 and Column 2 are the names of the Columns you want to put that data into and Value1 and Value2 are the corresponding values you want to insert.

Let's use a table called 'Members_tbl' that holds 2 records as shown in Diagram 1.

Diagram 1
SQL Insert

To add a third record we could use the highlighted SQL insert statement below.

INSERT INTO Members_tbl (FirstName,LastName,Address,City) VALUES ('Henry','Cole','123 Smut Road','Dublin')

Diagram 2 illustrates what our revised table will look like after the SQL statement has been run.

Diagram 2
SQL Insert statement




ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software