sql insert asp





SQL Insert

















Home
SQL Basics:

SQL HOME
SQL Introduction
SQL Select
SQL Where
SQL And & Or
SQL Between
SQL Distinct
SQL Order By
SQL Try It
SQL Insert
SQL Update
SQL Delete
SQL Count

SQL Advanced:

SQL Functions
SQL Group By
SQL Aliases
SQL Join
SQL Create
SQL Alter

SQL Quiz Test

Resources:

SQL Books












SQL INSERT INTO




Insert New Rows

The INSERT INTO statement inserts new rows into a table:


INSERT INTO table_name
VALUES (value1, value2,....)

You can also specify the columns for which you want to insert data:

INSERT INTO table_name (column1, column2,...)
VALUES (value1, value2,....)




Insert a New Row
This "Persons" table:



LastName
FirstName
Address
City


Pettersen
Kari
Storgt 20
Stavanger


And this SQL statement:

INSERT INTO Persons 
VALUES ('Hetland', 'Camilla', 'Hagabakka 24', 'Sandnes')


Will give this result:


LastName
FirstName
Address
City


Pettersen
Kari
Storgt 20
Stavanger


Hetland
Camilla
Hagabakka 24
Sandnes





Insert Data in Specified Columns
This "Persons" table:


LastName
FirstName
Address
City


Pettersen
Kari
Storgt 20
Stavanger


Hetland
Camilla
Hagabakka 24
Sandnes


And This SQL statement:


INSERT INTO Persons (LastName, Address)
VALUES ('Rasmussen', 'Storgt 67')

Will give this result:


LastName
FirstName
Address
City


Pettersen
Kari
Storgt 20
Stavanger


Hetland
Camilla
Hagabakka 24
Sandnes


Rasmussen
 
Storgt 67
 








Jump to : Top Of Page or HOME.


We Help you for free. Please Help us!

Help us correct errors
Help us with spelling and grammar
Tell us what you think
Link to us from your pages



All information in this Web is for training only. We do not make any warranties of its correctness or
its fitness to be used. The risk of using it remains with the user.
Copyright © 1999-2001 by Refsnes Data. All Rights Reserved.










More Tutorials:


HTML  XHTML
XML  XSL
CSS  DTD
WAP  WML
JavaScript
DHTML  Flash
VBScript  ASP
SQL  AppML






News:

The Future ofProgramming

Web Security

Browser News

Web Standards






References:

HTML 4.01 Ref

XHTML 1.0 Ref

WML 1.1 Ref

CSS Reference

XSLT Elements

ASCII Reference

Entity Reference

HTML Colors

Color Values

Color Names

WAP Pages






Validation:


HTML  XHTML
CSS  DTD
XML  WML







About W3Scripts

Please link to us








Larger Text?








 XML Partners:


















Wyszukiwarka

Podobne podstrony:
sql functions asp
sql groupby asp
sql alter asp
sql orderby asp
sql alias asp
sql create asp
sql where asp
sql quiz asp
sql count asp
sql select asp
sql distinct asp
sql join asp
sql update asp
sql intro asp
sql tryit asp
sql?lete asp
sql insert

więcej podobnych podstron