Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
DATA TYPES



    Reshmi R
    reshmir@ymail.com
    www.facebook.com/reshmi.ramaswami
    twitter.com/reshmir1
    in.linkedin.com/in/reshmi r
    +917736719717
Data Types
• PostgreSQL has a rich set of native data types
available to users. Users may add new types
to PostgreSQL using the CREATE TYPE command.
•Integer : signed four-byte integer
     •-int_Hotel_id int
• Bigint : Signed eight-byte integer
     -bint_Cust_id bigint
• Boolean: logical Boolean (true/false)
     -bln_permission boolean
•Varchar(n): variable-length character string
     -vchr_Cust_name varchar(30)
•char(n):fixed-length character string
   -Chr_Cust_type char(5)
•double precision: double precision floating-
point number
  –Dbl_amount doubl precision
•Serial: autoincrementing four-byte integer
  –Pk_int_id int serial
•Text-variable: length character string
CREATE TABLE tablename (
   colname SERIAL
);
                           SERIAL
This is the same as

CREATE TABLE tablename (
  colname DEFAULT NEXTVAL (‘seq_name’))
Double precision Data type


•It stores decimal values.
•Storage size 8 bytes
•Range 15 decimal digit precision

•For eg. (Dbl_salary double precision)
If this presentation helped you, please visit our
       page facebook.com/baabtra and like it.
               Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baab
                    te.com
Data types

Data types

  • 2.
    Disclaimer: This presentationis prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3.
    DATA TYPES Reshmi R reshmir@ymail.com www.facebook.com/reshmi.ramaswami twitter.com/reshmir1 in.linkedin.com/in/reshmi r +917736719717
  • 4.
    Data Types • PostgreSQLhas a rich set of native data types available to users. Users may add new types to PostgreSQL using the CREATE TYPE command. •Integer : signed four-byte integer •-int_Hotel_id int • Bigint : Signed eight-byte integer -bint_Cust_id bigint • Boolean: logical Boolean (true/false) -bln_permission boolean
  • 5.
    •Varchar(n): variable-length characterstring -vchr_Cust_name varchar(30) •char(n):fixed-length character string -Chr_Cust_type char(5) •double precision: double precision floating- point number –Dbl_amount doubl precision •Serial: autoincrementing four-byte integer –Pk_int_id int serial •Text-variable: length character string
  • 6.
    CREATE TABLE tablename( colname SERIAL ); SERIAL This is the same as CREATE TABLE tablename ( colname DEFAULT NEXTVAL (‘seq_name’))
  • 7.
    Double precision Datatype •It stores decimal values. •Storage size 8 bytes •Range 15 decimal digit precision •For eg. (Dbl_salary double precision)
  • 8.
    If this presentationhelped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baab te.com