PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

INT

← All stacks

Theory

309/439

INT

INT is a whole number. TINYINT, SMALLINT, MEDIUMINT, BIGINT differ by range. INT UNSIGNED cannot be negative (good for ids). AUTO_INCREMENT is usually INT or BIGINT.

Marks 0–100: INT or TINYINT. Don’t INT(11) as ‘max 11 digits’ — the display width is a leftover, not a limit (deprecated).

Trap — INT for phone. Trap: INT(1) as boolean — use TINYINT(1) by habit, still 0/1.

On the example next to this theory: INT: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Exam tip

roll INT PRIMARY KEY, marks INT

INT — sample query

-- INT
CREATE TABLE demo (
  id INTEGER PRIMARY KEY,
  label TEXT NOT NULL,
  qty INTEGER DEFAULT 0
);
INSERT INTO demo (id, label, qty) VALUES
  (1, 'alpha', 2),
  (2, 'beta', 5);
SELECT label, qty FROM demo WHERE qty >= 2 ORDER BY qty DESC;

INT: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Short notes

  • DefINT = integer. UNSIGNED = no negatives.
  • RuleIDs INT/BIGINT. Phone VARCHAR.
  • TrapINT(11) as a real size limit.

Questions

1

Phone as INT?

309 / 439

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.