- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to store the PayPal decimal amount in the MySQL database?
In order to store PayPal decimal amount in the MySQL database, you can use DECIMAL(10,2). Let us first create a table −
mysql> create table DemoTable1491 -> ( -> Amount DECIMAL(10,2) -> ); Query OK, 0 rows affected (0.66 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable1491 values(987664.50); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable1491 values(18783874.90); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable1491 values(35363738.50); Query OK, 1 row affected (0.15 sec)
Display all records from the table using select statement −
mysql> select * from DemoTable1491;
This will produce the following output −
+-------------+ | Amount | +-------------+ | 987664.50 | | 18783874.90 | | 35363738.50 | +-------------+ 3 rows in set (0.00 sec)
- Related Articles
- How to store decimal in MySQL?
- How to insert DECIMAL into MySQL database?
- How to store usernames and passwords safely in MySQL database?
- What is the easiest way to store date in MySQL database?
- Where does MySQL store database files?
- How do I format a number as decimal to store it in MySQL?
- How to store decimal value in Android sqlite?
- How to store and retrieve a date into MySQL database using Python?
- How to specify Decimal Precision and scale number in MySQL database using PHPMyAdmin?
- How to store query output in temp MongoDB database?
- How do we insert/store a file into MySQL database using JDBC?
- Change value of decimal(19, 2) when inserting into the database in MySQL?
- How can we change the default MySQL database to the given database?
- How to store decimal values in a table using PreparedStatement in JDBC?
- Format amount values for thousands number with two decimal places in MySQL?

Advertisements