.

Basic Structure Of An SQL Query

Structured Query Language

Basic SQL Structure

Domain Types In SQL


  • char(n) : Fixed length character string, with user-specified length n.
  • varchar(n) : Variable length character strings, along with user-specified maximum length n.
  • int : Integer (a finite subset of the integers that is machine-dependent).
  • smallint : Small integer (a machine-dependent subset of the integer domain type).
  • numeric(p,d) : Fixed point number, with user-specified precision of p digits, with n digits to the right of decimal point.
  • real, double precision : Floating point and double-precision floating point numbers, with machine-dependent precision.
  • float(n) : Floating point number, with user-specified precision of at least n digits.
.