How to Insert INT in MySQL

An integer (INT) field in a database contains a numeric number. Inserting an integer value requires an integer field set up in your table. You can insert an integer value in a table using the MySQL Query Browser application, which is included with all versions of MySQL. Inserting the value uses the SQL "insert" statement command.

Instructions

    • 1

      Click the Windows "Start" button on your MySQL server. Click "All Programs," then click "MySQL." Click "Query Browser" to open the database software.

    • 2

      Type "use database" where "database" is the name of the MySQL server. This command activates and sets the software focus on the database. Press "Execute" to run the statement.

    • 3

      Type the SQL statement to insert the integer value. For instance, if you want to insert the number of orders set up by a customer, the following code inserts the integer "4" in the "OrderNumber" field:

      insert into customers (OrderNumber) values (4);

    • 4

      Click the "Execute" button in the main toolbar. The SQL code executes, and the value inserts into the table.

Related Searches:

References

Comments

You May Also Like

  • MySQL Indexing Tutorial

    Like an index in a book, a MySQL index allows you to find data more efficiently. The index only contains the fields...

  • How to Insert Into a MySQL Database

    Inserting new rows into a MySQL table is accomplished with the INSERT command. For the most part, it will be necessary to...

Related Ads

Featured