SQL: Creating Tables

Creating a Table

SQL Data Types

  1. Integer Types: INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, and BIGINT
  2. Fixed-Point Types: DECIMAL, NUMERIC
  3. Floating-Point Types: FLOAT, DOUBLE
  4. and Bit-Value Type: BIT
  1. CHAR
  2. VARCHAR
  3. BINARY
  4. VARBINARY
  5. BLOB
  6. TEXT
  7. ENUM
  8. and SET

An Example of Creating a Table

CREATE TABLE phone_book (
name VARCHAR(42),
phone INT
);

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Assigning Many Things in One Line of Python Code: Tuple Unpacking in 4 Minutes

MongoDB Data Modeling with Document Structure

Npyscreens: Creating a UI that will run a shell command

How APIs can ease your invoicing process?

Stripe and Quickbooks Integration

Compromised Endpoint to Compromised GCP : Gone in 60 Seconds

Time-Boxing Can Help Your Team Stay Productive

Data cataloging as the start of data governance: Interview with James Greenhill, former data…

Unity/C# Challenge 26: Ammo Collectable

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Malcolm Katzenbach

Malcolm Katzenbach

More from Medium

Window Functions in SQL

SQL by steps #8: UPDATE — modifying data

Rewriting Window Functions with Joins in SQL