Click here to Skip to main content
14,882,280 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
insert the value in table in database

What I have tried:

insert into tablename(coulumn_name1,coulumn_name2)values=="jayesh","Surat";
Updated 28-Jan-20 4:12am

INSERT INTO tablename (column_name1, column_name2) VALUES ('jayesh', 'Surat');

But do note that if you are doing this from a presentation language (C#, C++, VB, Python, PHP, ...) you should be using Parameterised Queries, not string concatenation. Exactly how you do that will depend on both the language you use, and the database type you are INSERTing into.
How to insert record in table

Google is your friend!
Here is links to a very good tutorial site:
SQL INSERT INTO Statement[^]
SQL Tutorial[^]
The W3 School site are an excellent place to start for SQL

SQL Tutorial[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900