Database / SQLite Interview questions
What is a PRIMARY KEY in SQLite?
A PRIMARY KEY uniquely identifies each row in a table, and SQLite enforces that no two rows
can share the same primary key value (unless declared otherwise for special cases like
WITHOUT ROWID tables).
CREATE TABLE person ( id INTEGER PRIMARY KEY, name TEXT );
A notable SQLite-specific detail: declaring a column as INTEGER PRIMARY KEY (exactly that
type, singular) makes that column an alias for the table's internal rowid — the fastest
possible way to look up a row, since it directly maps to SQLite's internal B-tree key rather than requiring a
separate index lookup.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
