How to Use SQL- Insert Into Statement

cialis generic price In USA government gives special accommodation to such children. Who gets affected by sexual issues? Both women and men both can best price levitra use it to treat arterial hypertension (i.e., high blood pressure in lungs). ‘Ajanta Pharma’ is the manufacturer of this product and facilitate the tablets throughout the world. The most common cause of hair loss in men affects their both mental as well as physical health and wellbeing. levitra uk The goal tadalafil online in uk click here for info of this ultimate treatment is for repairing damaged tissue and for reactivating existing cells with the body where it is broken lower for electrical power and regulating body’s temperature.


SQL- Insert Into Statement

The SQL INSERT INTO Statement is the SQL code that used to insert a new data into table in database.

SQL INSERT INTO Syntax

INSERT INTO  table_name (fieldName1, fieldName2, fieldName3,…) VALUES(value_for_fieldName1, value_for_fieldName2, value_for_fieldName3,…);

SQL INSERT INTO Example

The Insert Into command can be put under the click button to add new records into a table. For example below, add a new customer name, Address, City, State from Unbound text boxes on blank form to the tbl_Customer table.

design form

Set four Unbound text boxes as following:

  1. txtName             for Customer Name field
  2. txtAddress       for Address field
  3. txtCity                 for City field
  4. txtState              for State field

VB Code under Save Customer button:

code for insert

If click on Save Customer button without entering any data, a message box “There is no data to save” will pop up as shown below.

no data to save

After entering the customer information and click Save Customer button, the data will be saved into table tbl_Customer  with a message of saving successfully.

save successfully

After click on the OK button on the message box, all text boxes will be set to blank and ready to add another customer.

blank form after save



Related posts