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.
-
1