Interview Question

What are tables in SQL?

A table stores typed rows under named columns and constraints.

💡 Concept ✅ Quick Revision 🗃️ SQL

Answer

A table is a named relation whose columns describe attributes and whose rows store records. • Each column has a declared data type. • Constraints can restrict the values allowed in rows. • A table does not have a guaranteed display order unless a query uses ORDER BY.

💡 SQL Example

CREATE TABLE products ( product_id integer PRIMARY KEY, name text NOT NULL, price numeric(10, 2) );

Result

CREATE TABLE

⚡ Quick Revision

A table stores typed rows under named columns and constraints.