Click to See Complete Forum and Search --> : SQL INSERT


Mitre
January 19th, 2001, 02:30 AM
ANy examples for how to use the SQL INSERT statement?

Johnny101
January 19th, 2001, 10:49 AM
do you mean just an INSERT statement? this should be in any basic progrmming book. the general syntax is:


INSERT INTO MyTable (FieldNameList) VALUES (ValuesInFieldListOrder)

'more detailed:
INSERT INTO MyTable (FirstName, LastName, Address, City, Age, DOB) VALUES ('John', 'Pirkey', '123 ABD st.', 'Anywhere', 30, '1/1/1970')




the tick marks indicate a string value for both access and sql server. however, for the date, sql server wants a tick, but access wants a pound sign.

hope this helps,

john

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

Mitre
January 21st, 2001, 09:28 PM
thks got it working