TGViewer
Coding Interview Resources Coding Interview Resources @crackingthecodinginterview ยท 52.2K subscribers
Post #3012 1.28K
โœ… Core SQL Interview Questions With Answers ๐Ÿ–ฅ๏ธ

1 What is SQL
โ€ข SQL stands for Structured Query Language
โ€ข You use it to read and manage data in relational databases
โ€ข Used in MySQL, PostgreSQL, SQL Server, Oracle

2 What is an RDBMS
โ€ข Relational Database Management System
โ€ข Stores data in tables with rows and columns
โ€ข Uses keys to link tables
โ€ข Example. Customer table linked to Orders table using customer_id

3 What is a table
โ€ข Structured storage for data
โ€ข Rows are records
โ€ข Columns are attributes
โ€ข Example. One row equals one customer

4 What is a primary key
โ€ข Uniquely identifies each row
โ€ข Cannot be NULL
โ€ข No duplicate values
โ€ข Example. user_id in users table

5 What is a foreign key
โ€ข Links one table to another
โ€ข Refers to a primary key in another table
โ€ข Allows duplicate values
โ€ข Example. user_id in orders table

6 Difference between primary key and foreign key
โ€ข Primary key ensures uniqueness
โ€ข Foreign key ensures relationship
โ€ข One table can have one primary key
โ€ข One table can have multiple foreign keys

7 What is NULL
โ€ข Represents missing or unknown value
โ€ข Not equal to zero or empty string
โ€ข Use IS NULL or IS NOT NULL to check

8 What are constraints
โ€ข Rules applied on columns
โ€ข Maintain data quality
โ€ข Common constraints
โ€“ NOT NULL
โ€“ UNIQUE
โ€“ PRIMARY KEY
โ€“ FOREIGN KEY
โ€“ CHECK

9 What are data types
โ€ข Define type of data stored
โ€ข Common types
โ€“ INT for numbers
โ€“ VARCHAR for text
โ€“ DATE for dates
โ€“ FLOAT or DECIMAL for decimals

10 Interview tip you must remember
โ€ข Always explain with a small example
โ€ข Speak logic before syntax
โ€ข Keep answers short and direct

Double Tap โค๏ธ For More
  • โค 7
  • ๐Ÿ‘ 1
More from @crackingthecodinginterview
  1. Oct 7, 2026๐Ÿš€ DSA Topics Every Programmer Should Know ๐Ÿ’ป๐Ÿ”ฅ ๐Ÿ“ฆ 1. Arrays โœ” Traversal โœ” Searching โœ” Sorโ€ฆ
  2. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  3. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  4. Sep 29, 2026โœ… Daily Coding Habits That Make You a Better Developer ๐Ÿง ๐Ÿ’ปโœจ 1๏ธโƒฃ Code Every Day (Even 30 Mโ€ฆ
  5. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
  6. Sep 28, 2026Hereโ€™s a DSA problem-solving cheat sheet that will help you solve 90โ€“95% of questions thatโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’