BitDaddys

BitDaddys
Home

Product Sections
Product Locator
Email Utilities
Database Utilities
Other Products

Reference Sections
Articles
MySQL
Outlook - Import EML
.net Network Security
Flash
Fireworks
PHP
DB/C
Java
Email File Extensions
EML email file extension
MSG email file extension
TNEF email file extension
TXT email file extension
HTML email file extension
Java Script

OISV - Organization of Independant Software Vendors - Charter Member

Recommended Links

Get Firefox



Get Thunderbird  

MySQL

Find good sites at
Find good sites at Gimpsy  

 

Web Master:

Keith Birchfield


MSGDETACH
MySQL Data Backup Tool
BitDaddys Corp.
$12.00

More Info
Free Trial
Buy Now!
Unique and Easy to use MySQL Database backups. Powerful Hourly Rotations. more ...
MySQL Tutorials Table Of Contents
Part 1: Start MySQL and Create Databases and Tables (Create)
Part 2: Add Data (Insert and Replace)
Part 3: Show Data (Select)
Part 4: Delete Data (Delete and Drop)
Part 5: Backup Data (Dump)
How to use C# and MySQL Connector/Net

How to use MySQL 5 Part 2: Add Data
(greatly simplified)

This article and tutorial describes and demonstrates how you can:

  • [ click here ] Add data using the INSERT command
  • [ click here ] Add and update data using the REPLACE command

What is the MySQL INSERT Command?

The MySQL INSERT command is how you put information into the tables you create and use. It is the primary way of adding new information to your mysql database.

INSERT will give an error if you use it to add data that is a duplicate of row data already in the table. In other words, if the key portion of what you are adding is already there, then an error will result.

INSERT SYNTAX

How do I add data to MySQL 5 using the Insert Command?

Steps To Add Data using the
MySQL INSERT Command

Visual Demonstration
  1. Open the MySQL Command Line and select your database
  2. Type 'INSERT'
  3. Type your table name 'mytable'
  4. Type the list of column names '(id,x)'
  5. Type the list of values 'values(104,'anything');

Syntax:

INSERT MyTable SET CustomerNumber='100', CustomerName='ACME Hardware'

or

INSERT MyTable (CustomerNumber, CustomerName) Values('100', 'ACME Hardware')

 

"INSERT inserts new rows into an existing table. The INSERT ... VALUES and INSERT ... SET forms of the statement insert rows based on explicitly specified values. ... "

more info...

[ return to top ]


What is the MySQL the Replace Command?

The MySQL REPLACE command is how you can also put information into the tables you create and use. It is the a way of adding or updating new information to your mysql database.

REPLACE will not give an error if you use it to add data that is a duplicate of row data already in the table, instead, it will put the information on top of the existing data. In other words, if the key portion of what you are adding is already there, then an update will result.

REPLACE SYNTAX

How do I add data to MySQL 5 using the Replace Command?

Steps To Add Data using the
MySQL REPLACE Command

Visual Demonstration
  1. Open the MySQL Command Line and select your database
  2. Type 'REPLACE'
  3. Type your table name 'mytable'
  4. Type the list of column names '(id,x)'
  5. Type the list of values 'values(103,'abcxyz')

Syntax:

REPLACE MyTable SET CustomerNumber='100', CustomerName='ACME Hardware'

or

REPLACE MyTable (CustomerNumber, CustomerName) Values('100', 'ACME Hardware')

 

"REPLACE works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted. ... "

more info...

[ return to top ]

 

 

 
OISV - Organization of Independant Software Vendors - Charter Member
Highlighted Products
outlookSpiller
EML and MSG Exporter

BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Export eml, msg, tnef, txt and HTML Files from Outlook more ...

outlookFiller
BitDaddys Corp.
$12.00

More Info
Free Trial
Buy Now!
Import eml and msg Files into Outlook more ...

MSGDETACH
mboxPack
BitDaddys Corp.
$10.00

More Info
Free Trial
Buy Now!
Pack email files into mbox files. Plain text, individual eml,msg,txt files to Thunderstor compatable and ready to use mbox more ...

O2X
ODBC 2 C#
BitDaddys Corp.
$5.00

More Info
Free Trial
Buy Now!
Convert ODBC table information into a c# class and a ready to use Visual Studio 2003 project more ...

EML and MSG converter
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Convert eml and msg Files into EML, MSG,TXT, TNEF, HTML more ...

MSGDETACH
MSGDETACH
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Detach Email Attachments from your Email and Save them wherever you want! Extract your message attachments from Outlook msg files. more ...

PopTransAct
BitDaddys Corp.
$19.95

More Info
Free Trial
Buy Now!
POP3 Email Transfers and Actions. Extract, Archive Save and Merge Attachments. Archive and forward Messages from any POP3 Account, even gmail! more ...

ThunderStor
ThunderStor
BitDaddys Corp.
$10

More Info
Free Trial
Buy Now!
ThunderStor offers the user a simple, fast and effective method to extract ThunderBird Mail from the mail box files to individual standard email message files.


Google

About Us | Site Map | Privacy | Contact Us | ©2008 BitDaddys Corp.