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

SQL · Theory

AND

← All stacks

Theory

46/439

AND

AND means both conditions true. WHERE marks >= 40 AND city = 'Pune'; Pune students who passed. If one side is false, the row is out.

Chain — a AND b AND c. Mix with OR only with brackets.

Trap: WHERE marks > 40 AND marks < 40 — empty on purpose. Trap: AND vs comma in English ‘students in Pune and Goa’ — that is OR for city, not AND.

On the example next to this theory — AND — wHERE combines predicates with AND/OR; LIKE does pattern match.

Exam tip

WHERE marks >= 40 AND city = 'Pune';

AND — sample query

CREATE TABLE products (id INTEGER PRIMARY KEY, name TEXT, price REAL);
INSERT INTO products VALUES (1, 'Pen', 10), (2, 'Book', 200), (3, 'Bag', 50);
SELECT * FROM products
WHERE price BETWEEN 20 AND 150 AND name LIKE 'B%';

AND — wHERE combines predicates with AND/OR; LIKE does pattern match.

Short notes

  • DefAND = both conditions must be true.
  • RuleBracket when mixing OR.
  • Trap‘Pune and Goa’ in English is OR in SQL.

Questions

1

What does AND do?

46 / 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.