Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5951019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:28:37+00:00 2026-05-22T17:28:37+00:00

This MySQL table is generated by ActiveRecord. +——————–+————-+——+—–+———+—————-+ | Field | Type | Null

  • 0

This MySQL table is generated by ActiveRecord.

+--------------------+-------------+------+-----+---------+----------------+
| Field              | Type        | Null | Key | Default | Extra          |
+--------------------+-------------+------+-----+---------+----------------+
| id                 | int(11)     | NO   | PRI | NULL    | auto_increment |
| RecordType         | tinyint(4)  | YES  |     | NULL    |                |
| Location           | varchar(8)  | YES  |     | NULL    |                |

Please explain to me what is meant by tinyint(4) in the second column. According to MySQL documentation the size of tinyint is one bytes. But does this mean it takes actually 4 bytes to store this data. The code for generating the second column is like this.

t.column :RecordType, :integer, :limit => 1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:28:38+00:00Added an answer on May 22, 2026 at 5:28 pm

    It means it uses 1 byte for that data type, not 4 so therefore the range of possible numbers is smaller (-128 to 127 or 0 – 255 for unsigned or 2^8 if you will which is 1 byte).

    TINYINT(4) is the display length, so it means it’ll use four digits to represent the number.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this MySQL table definition: CREATE TABLE groups ( ug_main_grp_id smallint NOT NULL default
I have this mysql table called comments which looks like this: commentID parentID type
I have this in a MySQL db: table Message sender_id int recipient_id int created
Imported into a MySQL table is a report that contains a user generated field
This is the MySQL table structure that I have: itemID (BIGINT) userID (BIGINT) wasAdded
I have a MySQL table like this: Payments +----+---------------------+---------+ | id | date (sorted
Let's say I have a MySQL table that is something like this: software table:
I have a table in mysql like this Name Result T1_09_03_2010 fail T2_09_03_2010 pass
This is for MySQL and PHP I have a table that contains the following
I have an ISAm table in mySql that was created similar to this: create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.