09988741983

ISO 9001:2015 Certified Company

Sukrala IT Services Pvt. Ltd.,
SCO 23-24-25, Level 3rd,
SEC 34-A, Chandigarh.
Phone: 99-88-74-1983, 0172-503-1983

MySQL

  • 0

MySQL

Tags : 

MySQL Data Types

 

  • Introduction to MySQL Data Types
  • Rules for using MySQL Data Types
  • Different MySQL Data Types

 

Introduction to MySQL Data Types

Before creating Tables, you should know about data types. Data types have an elegant role while creating tables. Data types apply to fields. Every column stores a different kind of value in any table. Data types are used to define what kind of value the store will store. Every column is defined when creating the data type table.

Imagine that you are creating a table that will store information about employees. In this table you want to add a column that will store the names of the employees. For this column you will define character data type while creating table. This is similar to creating a variable in a programming language.

In this tutorial, I’m just telling you about data types. You can learn how to use them in the tables. MySQL data types can be divided into 4 major categories.

  1. Numeric
  2. Character String
  3. Binary String
  4. Temporal   

Mysql

 

Rules For Defining Data Types

Before discussing these data types with detail, let’s try to know some of the rules that you should keep in mind while decrying data types.

  1. You should use the same data type that will represent your data properly.
  2. You should define a data type that can define the data at least in memory space. By doing so you save resources.
  3. You should use data type that can store the maximum value of your data.

Now let’s try to know more about the data types used in MySQL.

 

Numeric Data Types

Numeric data types are used to store numeric values. Numeric types have been divided into 4 categories. These are being given below.

Integer

Integer types are used to store whole numbers. Whole numbers are numbers that do not have fractional part (decimal and numbers after that). Integer types have been divided into 5 categories according to size.

Types Explanation
Tinyint This is an integer data type to store a very small value. In it, you can store any number from 128 to 128.
Smallint This data type is used to store more value than tinyint. In it you can store a value of -32768 to 32768.
Medium Int This is the data type to store a medium size value. Its range ranges from -8388608 to 8388607.
Int This is the most popular integer type, in which you can store value from -2147483648 to 2147483648.
Big Int This is the largest integer type and you can store any value up to 9223372036854775807.

      

Floating Point

Floating point numbers are numbers that include the fractional part (decimal and the number after that). Floating point numbers have been divided into 2 categories according to size.

Type   Explanation
Float   Float single precision (7 digits after decimals) is the floating point type. Its size is 4 bytes.
Double   This is double precision floating point type. Its size is 8 bytes.

 

Fixed Point Types

Fixed point data types are used to store decimal numbers. Decimal numbers contain a number that is integer, in which the fractional part can also be included. The special thing of this data type is that in it you can store only fractional part. You can also control values ​​as if you want to store 2 values ​​after decimals, you can also do this by using this data type.

Bit Type

Bit data type presents the bit field value. In the Bit data type, you add width, it shows how many bits of the value to store.

Example – bit_column BIT (4)

 

Character String Data Types

Character string data types represent alphanumeric values ​​(number and character). Character string is a very valuable data type, many programming languages ​​use it. There are 3 types of character string data types in MySQL, let’s try to know them.

 

Type   Explanation  
Char Char is a fixed length data type. When you define a column of char type, you have to give the maximum length (the number of bytes you want to store). You can not store a value greater than that length.
VarChar VarChar is a variable length data type. You can also store values ​​of more size than the length you are given in it.
Text   Text type stores unstructured text. These can store the value of the text variable length.  

  

Binary String Data Type

Binary values ​​are sequences of bytes. It is stored as a pair of 8 bits. You can also store images, sounds, movies, and executable files in the Binary string data types. Because these are all in binary format. There are 2 types of binary string data types in MySQL.

Type Explanation
Binary This data type is the same as char but it stores binary byte strings.
VarBinary This is similar to the data type varchar but it stores the binary byte string.

 

Temporal Data Type

In MySQL, date and time types are called temporal types. In such data types, you can store temporal information such as time, year, date etc. Temporal data types are of 5 types.

Type

Explanation  

Time type Time store is done in this data type. Its size is 3 bytes.  
Year type This data type is used to store any year.
Date type Date type is used to store single date.
DateTime type This type is used to store both date and time.
Timestamp type It also stores date and time like date Time type, just the format is different.

 

If you are in Chandigarh and are looking for MySQL and PHP training in Chandigarh then join CBITSS Technologies. CBitss  is the Best Mysql and PHP Training Institute in Chandigarh, join now.

 


Contact Us

Student Review

Linux Training in Chandigarh
April 15, 2016
Linux Training in chandigarh5/5 stars
Linux training in Chandigarh is provided by Mr. Navneet. A person having more than 12 years of versatile experience in the field of open source technologies. CBitss technology's best part is that they have self designed study material which helps individuals to get in depth knowledge of Core LINUX.

Linux Training in Chandigarh

Linux Training in Chandigarh
Rated Linux Training in chandigarh5/5 based on 9693 reviews

RHCE Certificate

red hat linux training & certification in chandigarh

PPT

Facebook Likes

Testimonials

  • Mandeep Singh

    The technology experts who have been provided by this training organization have been highly skilled professionals. They have been willing to take on the full role of a real mentor in this organization and have been accountable for standards within an outstanding training environment.

    I am delighted with the level of training & placement services offered by CBitss Technologies.

  • Redhat linux certification in Chandigarh

    Diwaker joshi

    All staff at CBitss Technologies connect with the candidates at an emotional level and made a lasting impression. Specially, Mr. Navneet Sharma is passionate and persuasive trainer, and his ability to ignite the trainees into action is remarkable,his creative designs and his explanation that makes us to think is marvellous.

Video

CBitss Events

PHP Training in Chandigarh by the Best PHP Training Institute in Chandigarh.
Starts: Thur, 03/10/16 at 9:30 a.m.
Ends: sat, 03/12/16 11:30 a.m.

500 - 1000

Student Review

PHP Training in Chandigarh
PHP Training in Chandigarh 5/5 stars
Best PHP Training in Chandigarh is provided by CBitss Technologies which is one of the premier training institute in chandigarh providing PHP developers to the industry.

PHP Training in Chandigarh

PHP Training in Chandigarh
Rated PHP training in Chandigarh 5/5 based on 9963 reviews

PPT

Facebook Likes

Testimonials

  • php industrial training in chandigarh

    Kamini

    We were all hugely pleased with JOB placement provided by CBitss Technologies just after completion of our training.Being girls we found homely environment. The feedback here is that it was by far the best expert trainers we've ever seen.
    Along with technical skill on latest technologies, we were also given inspiration and urge to do hard work by virtue of which we could get JOB.

  • php training institute in chandigarh

    Rajneesh Singh

    The staff at CBitss Technologies are always very polite and helpful and have dealt efficiently with our queries or concerns we may have had during entire training.
    They are pro-active in checking if everything is satisfactory and I would highly recommend their services. Today I am working in IT park Chandigarh and whole credit goes to my mentors at CBitss.

Facebook Comments

Facebook Comments

Video

How to install Wamp Server

PHP Training in Chandigarh is provided by CBitss which is the Best PHP Training Institute in Chandigarh.

Student Review

Web Designing Course in Chandigarh
April 18, 2016
Web Designing Course in Chandigarh 5/5 stars
CBitss Technologies provides the best Web designing course in Chandigarh. It covers concepts like HTML, CSS, Photoshop, Corel Draw, Illustrator & Boot Strap...

Web Designing Course in Chandigarh

Web Designing Course in Chandigarh
Rated Web Designing Training in Chandigarh 5/5 based on 9369 reviews

PPT

Facebook Likes

Testimonials

  • web designing company in chandigarh

    Amit Thakur

    CBitss Technologies is a place where I got the right track for my future as i have completed my course from here and now, I am working in a MNC company. All trainers are well experienced and motivate to learn more & new things. I am feeling proud that i am a student of CBitss and also thankful to our mentors.

  • web designing course in chandigarh sector 34

    Gurpreet Kaur

    CBitss Technologies provide me excellent training in Web Designing. I enjoyed working with all of my instructors. I have learned a lot from Web designing training in Chandigarh during my six month training. Competent instructors, up-to-date material, and an overall outstanding quality of training and facilities provided by CBitss Technologies. A special attention is given to all students, so I think CBitss is a Best place for learning Web designing.
    “ I am thankful for being a part of CBitss Technologies.”

Video

Student Review

SEO/PPC Training in Chandigarh
March 07, 2016
SEO/PPC Training in Chandigarh5/5 stars
CBitss Technologies provides the best SEO/PPC Training in Chandigarh. CBitss team has in depth knowledge in all types of digital marketing techniques.

SEO/PPC Training in Chandigarh

SEO/PPC Training in Chandigarh
Rated SEO/PPC Training in Chandigarh5/5 based on 9369 reviews

Chandigarh’s First Youtube Channel-Video Management Laboratory Setup

Adwords video Certification

SEO courses in chandigarh

Adwords Search Certificate

best seo training institute in Chandigarh

Adwords Shopping Certification

SEO course in chandigarh

Adwords Display Certification

SEO course in chandigarh

Google Analytics Certification

Best SEO training in chandigarh

Bing Ads Certification

digital marketing course in chandigarh

PPT

Facebook Likes

Testimonials

  • SEO training institute in Chandigarh - Bhavna

    Bhawna

    Digital marketing is one of the best and easiest strategyfor marketing. I have done digital marketing course from CBitss Technologies. It is one of best SEO training institute in Chandigarh, which are thoroughly discussed all SEO techniques used to get top Google ranking of our website. All staff at CBitss are very co-operative and give all their attention to students.
    “ I am very happy that I am a part of CBitss Technologies and I have learnt many new things from CBitss.”

Video

Student Review

Android Training in Chandigarh
April 15, 2016
Android Training in Chandigarh 5/5 stars
CBitss is an awesome opportunity for the students who aspire to make a flourishing career in the Gaming Industry or I.T Industry. Join CBitss Technologies which provides the best Android training in Chandigarh.

Android training in Chandigarh

Android training in Chandigarh
Rated Linux Training in chandigarh 5/5 based on 9369 reviews

PPT

Facebook likes

Testimonials

  • Android course in chandigarh

    Harman Singh

    Miss. Pooja has multiple methods to make learning fun and easier for students. She has always been excited in sharing her creative ideas with us through practical & logical approach. A special attention is given to every individual student so that one could do practical work independently.

    I am proud and thankful, beyond words, for being a part of CBitss Technologies.

  • Best android training institute in chandigarh

    Khushlender

    I would strongly recommend CBitss Technologies because they have dedicated JOB placement department which groom the candidates for interview preparation and skill development. The way they keep on informing the candidates about new job vacancies and need of job is really a helping tool.

Video

Student Review

CCNA Training in Chandigarh
PHP Training in Chandigarh 5/5 stars
I am really satisfied with CCNA Training in Chandigarh at CBitss Technologies. All credits goes to my professional trainer & CBitss. They trained me well with many practical exercises.

CCNA Training in Chandigarh

CCNA Training in Chandigarh
Rated PHP training in Chandigarh 5/5 based on 9969 reviews

Facebook Page

Facebook Likes

Testimonials

  • web designing company in chandigarh

    Amit Thakur

    CBitss Technologies is a place where I got the right track for my future as i have completed my course from here and now, I am working in a MNC company. All trainers are well experienced and motivate to learn more & new things. I am feeling proud that i am a student of CBitss and also thankful to our mentors.

  • Android course in chandigarh

    Harman Singh

    Miss. Pooja has multiple methods to make learning fun and easier for students. She has always been excited in sharing her creative ideas with us through practical & logical approach. A special attention is given to every individual student so that one could do practical work independently.

    I am proud and thankful, beyond words, for being a part of CBitss Technologies.

  • Mandeep Singh

    The technology experts who have been provided by this training organization have been highly skilled professionals. They have been willing to take on the full role of a real mentor in this organization and have been accountable for standards within an outstanding training environment.

    I am delighted with the level of training & placement services offered by CBitss Technologies.

  • php industrial training in chandigarh

    Kamini

    We were all hugely pleased with JOB placement provided by CBitss Technologies just after completion of our training.Being girls we found homely environment. The feedback here is that it was by far the best expert trainers we've ever seen.
    Along with technical skill on latest technologies, we were also given inspiration and urge to do hard work by virtue of which we could get JOB.

  • Best android training institute in chandigarh

    Khushlender

    I would strongly recommend CBitss Technologies because they have dedicated JOB placement department which groom the candidates for interview preparation and skill development. The way they keep on informing the candidates about new job vacancies and need of job is really a helping tool.

  • SEO training institute in Chandigarh - Bhavna

    Bhawna

    Digital marketing is one of the best and easiest strategyfor marketing. I have done digital marketing course from CBitss Technologies. It is one of best SEO training institute in Chandigarh, which are thoroughly discussed all SEO techniques used to get top Google ranking of our website. All staff at CBitss are very co-operative and give all their attention to students.
    “ I am very happy that I am a part of CBitss Technologies and I have learnt many new things from CBitss.”

  • web designing course in chandigarh sector 34

    Gurpreet Kaur

    CBitss Technologies provide me excellent training in Web Designing. I enjoyed working with all of my instructors. I have learned a lot from Web designing training in Chandigarh during my six month training. Competent instructors, up-to-date material, and an overall outstanding quality of training and facilities provided by CBitss Technologies. A special attention is given to all students, so I think CBitss is a Best place for learning Web designing.
    “ I am thankful for being a part of CBitss Technologies.”

  • php training institute in chandigarh

    Rajneesh Singh

    The staff at CBitss Technologies are always very polite and helpful and have dealt efficiently with our queries or concerns we may have had during entire training.
    They are pro-active in checking if everything is satisfactory and I would highly recommend their services. Today I am working in IT park Chandigarh and whole credit goes to my mentors at CBitss.

  • Redhat linux certification in Chandigarh

    Diwaker joshi

    All staff at CBitss Technologies connect with the candidates at an emotional level and made a lasting impression. Specially, Mr. Navneet Sharma is passionate and persuasive trainer, and his ability to ignite the trainees into action is remarkable,his creative designs and his explanation that makes us to think is marvellous.

error: Content is protected !!