Different SQL data types

0
38

In this topic, you will learn about, What are the different SQL data types?

The major data types in PL/SQL include NUMBER, CHAR, VARCHAR2, DATE, and TIMESTAMP.

  1. Numeric variables: To define a numeric variable, the programmer appends the variable type NUMBER to the name definition. To
    Syntax: variable_name number([P,S]) := 0;
  2. Character variables: To define a character variable. Other datatypes for character variables include: varchar, char, long, raw, long raw, nchar, nchar2, clob, blob, bfile
    Syntax: variable_name varchar2(20) := ‘Text’;
    e.g: address varchar2(20) :=’lake view road’;
  3. Date variables: Date variables can contain date and time.
    Syntax: variable_name date := to_date(’01-01-2005 14:20:23′,’DD-MM-YYYY hh24:mi:ss’);

    Comment below if you have queries related to the above article.

LEAVE A REPLY

Please enter your comment!
Please enter your name here