Get startedGet started for free

Using integer types

The Small Business Administration through its local Small Business Development Centers (SBDC) provides advising and technical support for entrepreneurs and small businesses. Given the importance of having an online presence, the SBA is starting an initiative to help small businesses with e-commerce website development. You have been brought in to develop a database to store data on these development efforts. In this exercise, you will have the opportunity to use your knowledge of integer data types in PostgreSQL for defining a table for SBDC clients.

This exercise is part of the course

Creating PostgreSQL Databases

View Course

Exercise instructions

  • Complete the definition of the client table using the most appropriate integer type to support the range of possible data values for the column.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

-- Create the client table
___ ___ ___ (
	-- Unique identifier column
	id ___ PRIMARY KEY,
    -- Name of the company
    name VARCHAR(50),
	-- Specify a text data type for variable length urls
	site_url VARCHAR(50),
    -- Number of employees (max of 1500 for small business)
    num_employees ___,
    -- Number of customers
    num_customers ___
);
Edit and Run Code