Databases| SQL| MySQL| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
SQL Decimal 
 

SQL Decimal is used to specify the values in decimal datatype.

 

SQL Decimal

                         

SQL Decimal is used to specify the values in decimal datatype. The Decimal datatype can be of two types : Decimal (p) refers to floating point and Decimal fixed point (p,s). The DECIMAL data type can store decimal floating-point numbers up to a maximum of 32 significant digits and Decimal fixed point can store upto 16 significant digits.

Understand with Example

The Tutorial illustrate an example from 'SQL Decimal'. To understand and grasp the example we create a table 'emp' that has the required fieldnames and datatypes respectively.

Create table stu:

Create table emp( id int, name varchar(15), salary decimal(5));

Insert values:

The insert into is used to add the records to the table 'emp'.

insert into emp values (1,'Ajay',12000);
insert into emp values (2,'Bhanu',12000);
insert into emp values (3,'Komal',12000);
insert into emp values (4,'Rakesh',12000);

emp table

mysql> select * from emp;
+------+--------+--------+
| id   | name   | salary |
+------+--------+--------+
| 1    | Ajay   | 12000  |
| 2    | Bhanu  | 12000  |
| 3    | Komal  | 12000  |
| 4    | Rakesh | 12000  |
+------+--------+--------+
4 rows in set (0.02 sec)

                         

» View all related tutorials
Related Tags: sql mysql c query rest table select io return tab show if condition ie record where records ci ws sh

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.