MySQL interview questions test 2 things: whether your query compiles in MySQL's dialect, and whether you can explain InnoDB, indexes, and EXPLAIN. In one DoorDash data engineer screen on HackerRank, the editor accepted only MySQL, and PostgreSQL syntax wouldn't compile. The 23 questions below include 11 from named 2024 to 2026 interviews, and each one is answered in MySQL 8.0 syntax.
Recent MySQL interview questions by company
The questions in the table come from named data engineer, data scientist, analyst, and business intelligence rounds. In some of them the entry comes from a topic the round covered, and the wording is a reconstruction:
| Question | Company and role | Asked in |
|---|---|---|
| Unpivot columns into rows | Uber, business analyst | 2026 |
| Monthly share of high-frequency customers | DoorDash, data scientist | 2026 |
| Month-over-month sales ratio for each restaurant | DoorDash, data scientist | 2026 |
| Window function vs. self-join | Amazon, business intelligence engineer intern | 2026 |
| Count a boolean flag in one pass | DoorDash, data engineer | 2026 |
| Fibonacci series with a recursive CTE | Tesla, data analyst | 2025 |
| Click-through rate with dates stored as strings | Meta, data scientist | 2025 |
| Employee tenure buckets | DoorDash, data engineer | 2025 |
| Average and standard deviation with missing values | Amazon, business intelligence engineer | 2025 |
| DELETE, TRUNCATE, and DROP | Visa, big data engineer | 2025 |
| Delete duplicate emails | Google, data analyst | 2024 |
The other 12 questions here aren't tied to a specific company. They cover the MySQL behavior that breaks answers written from PostgreSQL habit: ONLY_FULL_GROUP_BY, NULL ordering, GROUP_CONCAT, clustered primary keys, and EXPLAIN output.
Which SQL interviews run in MySQL
Each company, and sometimes each round, picks its own SQL dialect. Recent rounds handled it like this:
| Company and role | Round and date | Dialect | What it changed |
|---|---|---|---|
| DoorDash, data engineer | HackerRank screen, 2026 | MySQL only | PostgreSQL syntax wouldn't compile, and test cases graded each query |
| Amazon, business intelligence engineer | Online assessment, 2025 | MySQL | 15 multiple-choice SQL concept questions written in MySQL syntax |
| Meta, data engineer | Technical screen and loop, 2025 | Not stated | You could ask the interviewer for PostgreSQL vs. MySQL syntax help |
| Meta, data engineer | Technical screen, 2026 | PostgreSQL | SQL and Python in one screen |
| Anthropic, data scientist | SQL round, 2026 | PostgreSQL | Queries had to run and pass test cases |
Ask your recruiter which dialect the editor runs before the screen. If it's MySQL, ask for the version too. Window functions and CTEs need MySQL 8.0 or later. In a data engineer screen graded by test cases, a query that won't compile fails every test, and rewriting it costs time.
MySQL date and time questions
MySQL date handling differs from PostgreSQL in function names, argument order, and return types. These MySQL 8.0 functions cover the common date tasks:
| Task | MySQL | PostgreSQL |
|---|---|---|
| First day of the month | DATE_FORMAT(d, '%Y-%m-01'), which returns a string | DATE_TRUNC('month', d) |
| 7 days before today | DATE_SUB(CURDATE(), INTERVAL 7 DAY) | CURRENT_DATE - 7 |
| Days between 2 dates | DATEDIFF(end_date, start_date) | end_date - start_date |
| Whole years between 2 dates | TIMESTAMPDIFF(YEAR, start_date, end_date) | EXTRACT(YEAR FROM AGE(end_date, start_date)) |
| Parse a string as a date | STR_TO_DATE(s, '%Y-%m-%d'), NULL if it can't parse | TO_DATE(s, 'YYYY-MM-DD'), an error if it can't parse |
| Day of the week | DAYOFWEEK(d), where 1 is Sunday | EXTRACT(DOW FROM d), where 0 is Sunday |
DATEDIFF and TIMESTAMPDIFF take their dates in opposite orders. DATEDIFF subtracts its second argument from its first, and TIMESTAMPDIFF subtracts its second argument from its third. The MySQL date and time function reference lists the rest.
1. Monthly share of high-frequency customers
DoorDash asked this in a 2026 data scientist SQL round on HackerRank.
Table delivery_order has order_dt, customer_id, restaurant_id, dasher_id, and delivery_id. For each month, what share of customers placed more than 30 orders?
WITH monthly AS (
SELECT
DATE_FORMAT(order_dt, '%Y-%m-01') AS order_month,
customer_id,
COUNT(*) AS orders
FROM delivery_order
GROUP BY order_month, customer_id
)
SELECT
order_month,
SUM(orders > 30) / COUNT(*) AS high_frequency_share
FROM monthly
GROUP BY order_month
ORDER BY order_month;DATE_FORMAT returns a string such as '2026-07-01', and the zero-padded year-month-day layout groups and sorts correctly. Wrap it in CAST(... AS DATE) if a later step needs a real date. MySQL also lets you name a SELECT alias in GROUP BY.
A MySQL comparison returns 1 or 0, which lets SUM(orders > 30) count the qualifying customers. MySQL's / returns a decimal, and the share doesn't truncate to 0 the way integer division does in PostgreSQL.
2. Month-over-month sales ratio for each restaurant
DoorDash asked this in the same 2026 data scientist round as question 1. The DoorDash SQL interview questions guide has the rest of that round.
Table sales has delivery_id and sales_amount. Compute each restaurant's month-over-month sales ratio.
WITH monthly AS (
SELECT
o.restaurant_id,
DATE_FORMAT(o.order_dt, '%Y-%m-01') AS order_month,
SUM(s.sales_amount) AS sales
FROM delivery_order o
JOIN sales s ON s.delivery_id = o.delivery_id
GROUP BY o.restaurant_id, order_month
)
SELECT
restaurant_id,
order_month,
sales,
sales / LAG(sales) OVER (PARTITION BY restaurant_id ORDER BY order_month) AS mom_ratio
FROM monthly
ORDER BY restaurant_id, order_month;For each restaurant's first month, LAG returns NULL, and the ratio is NULL too. Ask whether the interviewer wants that NULL kept or the first month left out.
The previous row isn't always the previous month. If a restaurant had no sales in February, LAG compares March with January. Tell the interviewer how you'd treat the gap.
3. Employee tenure buckets
DoorDash asked this in a 2025 data engineer phone screen, as the first of 4 SQL questions.
Table employees has employee_id and hire_date. Compute each employee's tenure today in whole years, rounded down. Bucket employees into 0-2, 3-5, 6-10, and 10+ years, and count each bucket.
WITH tenure AS (
SELECT
employee_id,
TIMESTAMPDIFF(YEAR, hire_date, CURDATE()) AS years
FROM employees
)
SELECT
CASE
WHEN years <= 2 THEN '0-2'
WHEN years <= 5 THEN '3-5'
WHEN years <= 10 THEN '6-10'
ELSE '10+'
END AS tenure_bucket,
COUNT(*) AS employees
FROM tenure
GROUP BY tenure_bucket
ORDER BY MIN(years);TIMESTAMPDIFF returns whole units and doesn't count an anniversary that hasn't arrived yet this year. YEAR(CURDATE()) - YEAR(hire_date) adds a year for anyone hired later in the calendar year than today's date.
The bucket labels overlap at 10 years. Say where the boundary goes: the query above puts exactly 10 years in 6-10.
4. Click-through rate for the last week, with dates stored as strings
Meta asked this in a 2025 data scientist technical screen, with about 10 minutes for 2 SQL questions. The Meta SQL interview questions guide has the follow-up on brand and direct campaigns.
Table ad_events has ad_id, date (stored as a string), event ('impression' or 'click'), and campaign_id. What was the click-through rate across all ads for the last week?
SELECT
SUM(event = 'click') / NULLIF(SUM(event = 'impression'), 0) AS ctr
FROM ad_events
WHERE STR_TO_DATE(`date`, '%Y-%m-%d') >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
AND STR_TO_DATE(`date`, '%Y-%m-%d') < CURDATE();STR_TO_DATE returns NULL for a string it can't parse, and a malformed row drops out of the filter with only a warning. PostgreSQL's TO_DATE raises an error on the same input. MySQL quotes identifiers such as date with backticks, and double quotes work for identifiers only in ANSI_QUOTES mode.
"Last week" could mean the trailing 7 days or the previous calendar week. The query uses the 7 full days before today, and NULLIF returns NULL in place of dividing by zero impressions.
MySQL GROUP BY, aggregation, and NULL questions
MySQL aggregation and type rules differ from PostgreSQL in GROUP BY checks, boolean sums, the STDDEV default, casts, and NULL sorting.
5. Why does this GROUP BY query fail in MySQL 8.0?
A nondeterministic query can return different results from the same data. MySQL's ONLY_FULL_GROUP_BY mode blocks one common kind.
Table orders stores customer_name next to customer_id, and a customer's name differs across some orders. Why does this query fail?
SELECT customer_id, customer_name, COUNT(*) AS orders
FROM orders
GROUP BY customer_id;ONLY_FULL_GROUP_BY is part of MySQL 8.4's default SQL mode. It rejects a select list that names a column outside GROUP BY unless the grouped columns determine it, and MySQL returns error 1055. With the mode turned off, MySQL picks any customer_name from each group, so the result can change between runs.
Fix it by grouping on the primary key of a customers table, which determines the name:
SELECT c.customer_id, c.customer_name, COUNT(*) AS orders
FROM customers c
JOIN orders o ON o.customer_id = c.customer_id
GROUP BY c.customer_id;MySQL accepts this because customer_id is the primary key of customers and determines the name. MAX(customer_name) or ANY_VALUE(customer_name) also satisfies the rule. ANY_VALUE keeps the nondeterminism. Use it only when every value in the group is the same.
6. Count a boolean flag in one pass
The DoorDash data engineer screen that accepted only MySQL also included a conditional-aggregation question on a true-or-false flag. The prompt below is a practice version of that topic.
Table deliveries has delivery_id, dasher_id, and is_late, a BOOLEAN. For each Dasher, return the number of deliveries, the number that were late, and the late share.
SELECT
dasher_id,
COUNT(*) AS deliveries,
SUM(is_late) AS late_deliveries,
AVG(is_late) AS late_share
FROM deliveries
GROUP BY dasher_id;MySQL's BOOLEAN is a synonym for TINYINT(1), and TRUE and FALSE are aliases for 1 and 0. SUM counts the late deliveries, and AVG returns the late share.
PostgreSQL rejects SUM on a boolean column with "function sum(boolean) does not exist". SUM(CASE WHEN is_late THEN 1 ELSE 0 END) runs in both dialects. Write that form when you're unsure which editor you're in.
7. Average and standard deviation with missing values
Amazon's 2025 business intelligence engineer phone screen gave a sales table and tested averages, standard deviation, CASE WHEN mapping, and missing values. Here's a practice version of that set.
Table sales has sale_id, region, and amount, and some amounts are NULL. For each region, return the number of missing amounts, the average amount, and the standard deviation.
SELECT
region,
SUM(amount IS NULL) AS missing_amounts,
AVG(amount) AS avg_amount,
AVG(IFNULL(amount, 0)) AS avg_with_missing_as_zero,
STDDEV_SAMP(amount) AS sd_amount
FROM sales
GROUP BY region;In MySQL, STDDEV and STD return the population standard deviation. PostgreSQL's stddev returns the sample standard deviation, which means the same function name gives 2 different numbers. Name STDDEV_SAMP or STDDEV_POP and say which one you chose.
AVG ignores NULLs, and avg_amount averages only the known amounts. IFNULL(amount, 0) counts each missing sale as zero and lowers the average. Ask which reading the interviewer wants. COALESCE does the same job, takes any number of arguments, and also works in PostgreSQL.
8. How do division, casts, and string concatenation differ in MySQL?
MySQL's arithmetic and string operators give different answers from PostgreSQL's on the same input:
| Operation | MySQL | PostgreSQL |
|---|---|---|
3 / 5 | 0.6, a decimal | 0, integer division |
| Integer division | 3 DIV 5 | 3 / 5 |
| Divide by zero in a SELECT | NULL | An error |
| Cast to an integer | CAST(x AS SIGNED) | CAST(x AS INT) or x::int |
| Join strings | CONCAT(a, b), NULL if either is NULL | a || b, or CONCAT(a, b), which skips NULLs |
MySQL's CAST accepts only SIGNED or UNSIGNED for integers, which makes CAST('42' AS INT) fail. MySQL also lacks the :: operator. In MySQL, || is a deprecated synonym for OR unless the PIPES_AS_CONCAT mode is on. Use CONCAT, or CONCAT_WS when you want NULLs skipped.
9. Sort with NULLs last
Table customers has customer_id and last_order_date, which is NULL for customers who never ordered. Sort from the oldest last order to the newest, with the customers who never ordered at the end.
SELECT customer_id, last_order_date
FROM customers
ORDER BY last_order_date IS NULL, last_order_date;MySQL sorts NULLs first in ascending order and last in descending order, and its ORDER BY doesn't support NULLS FIRST or NULLS LAST. PostgreSQL does the reverse by default and supports both options.
last_order_date IS NULL returns 0 for a real date and 1 for NULL, which sorts the NULL rows to the end. The same expression works in PostgreSQL, where false sorts before true.
10. Concatenate each group's values with GROUP_CONCAT
Table order_items has order_id and item_name. Return one row for each order, with its items in alphabetical order and separated by commas.
SELECT
order_id,
GROUP_CONCAT(item_name ORDER BY item_name SEPARATOR ', ') AS items
FROM order_items
GROUP BY order_id;GROUP_CONCAT is MySQL's version of PostgreSQL's STRING_AGG(item_name, ', ' ORDER BY item_name). Its default separator is a comma with no space.
MySQL cuts the result at group_concat_max_len bytes, which defaults to 1,024, and returns the truncated string. For long lists, run SET SESSION group_concat_max_len = 100000 before the query.
MySQL join, subquery, and set operation questions
PostgreSQL accepts 3 join and subquery patterns that MySQL rejects: LIMIT in an IN subquery, FULL OUTER JOIN, and deletes that read their own table. Pivots need a workaround in both dialects.
11. Second-highest salary with LIMIT and OFFSET
Return the second-highest distinct salary from employees, or NULL if there isn't one.
SELECT (
SELECT DISTINCT salary
FROM employees
ORDER BY salary DESC
LIMIT 1 OFFSET 1
) AS second_highest_salary;The outer SELECT returns NULL when there's no second salary, where a bare LIMIT query returns no row. MySQL also accepts LIMIT 1, 1 for the same result. The comma form puts the offset first, the reverse of LIMIT 1 OFFSET 1.
MySQL rejects LIMIT inside an IN subquery with error 1235, which breaks WHERE salary IN (SELECT ... LIMIT 3). Join to a derived table to get everyone with a top-3 salary:
SELECT e.employee_id, e.salary
FROM employees e
JOIN (
SELECT DISTINCT salary
FROM employees
ORDER BY salary DESC
LIMIT 3
) top_salaries ON top_salaries.salary = e.salary;Ties stay in the result: every employee earning a top-3 salary matches the join.
12. Emulate a FULL OUTER JOIN
Tables web_signups and app_signups each have signup_date and signups. Return every date that appears in either table, with both counts.
SELECT w.signup_date, w.signups AS web_signups, a.signups AS app_signups
FROM web_signups w
LEFT JOIN app_signups a ON a.signup_date = w.signup_date
UNION ALL
SELECT a.signup_date, NULL, a.signups
FROM app_signups a
LEFT JOIN web_signups w ON w.signup_date = a.signup_date
WHERE w.signup_date IS NULL
ORDER BY signup_date;MySQL's join syntax covers inner, cross, left, right, and natural joins, and FULL OUTER JOIN isn't among them. The first half keeps every web date, and the second half adds only the app dates with no web row.
The shorter LEFT JOIN UNION RIGHT JOIN version depends on UNION removing duplicates. UNION also merges identical rows that are real data, which makes the UNION ALL and anti-join version safer.
13. Delete duplicate emails
Google asked a version of this in a data analyst technical round in 2024.
Table users has id and email. Delete the duplicate emails and keep the row with the lowest id for each address.
DELETE u1
FROM users u1
JOIN users u2
ON u1.email = u2.email
AND u1.id > u2.id;MySQL won't let you modify a table and select from it in a subquery. The subquery answer, DELETE FROM users WHERE id NOT IN (SELECT MIN(id) FROM users GROUP BY email), runs in PostgreSQL and fails in MySQL. The multi-table DELETE joins users to itself and removes every row that has a lower-id twin.
MySQL's default collation, utf8mb4_0900_ai_ci, compares strings case-insensitively. '[email protected]' and '[email protected]' count as duplicates here, and in PostgreSQL they don't. Ask whether case variants should match.
14. Unpivot columns into rows
Uber's 2026 business analyst first round tested PIVOT and UNPIVOT live. The DoorDash data engineer screen from question 6 included a UNION question, and this prompt is a practice version of both topics.
Table monthly_metrics has metric_month, orders, cancellations, and refunds. Return one row for each month and metric.
SELECT metric_month, 'orders' AS metric, orders AS value FROM monthly_metrics
UNION ALL
SELECT metric_month, 'cancellations', cancellations FROM monthly_metrics
UNION ALL
SELECT metric_month, 'refunds', refunds FROM monthly_metrics
ORDER BY metric_month, metric;MySQL's SELECT syntax doesn't include a PIVOT or UNPIVOT clause. Stack one SELECT for each column with UNION ALL. Plain UNION removes duplicate rows by default, and UNION ALL keeps them when they're real data.
To pivot rows into columns, write one SUM(CASE WHEN ...) for each output column. The SQL interview questions and answers guide works through a pivot in full.
MySQL window function and CTE questions
MySQL added window functions and common table expressions in version 8.0, so the LAG and recursive CTE answers below don't run on MySQL 5.7.
15. Why choose a window function over a self-join?
Amazon asked why you'd pick a window function over a self-join in a 2026 business intelligence engineer intern interview. The prompt below is a practice version of that follow-up.
Table daily_revenue has revenue_date and revenue. Return each day's revenue next to the previous day's revenue.
SELECT
revenue_date,
revenue,
LAG(revenue) OVER (ORDER BY revenue_date) AS prev_revenue
FROM daily_revenue;The window version reads the table once and can't add rows. A self-join reads the table twice, and a join key that isn't unique multiplies rows:
SELECT d.revenue_date, d.revenue, p.revenue AS prev_revenue
FROM daily_revenue d
LEFT JOIN daily_revenue p
ON p.revenue_date = DATE_SUB(d.revenue_date, INTERVAL 1 DAY);When a date is missing, the 2 queries disagree. LAG returns the last row before it, and the self-join returns NULL because no row exists for the calendar day before. Ask which one the interviewer wants before you write either.
16. Generate the Fibonacci series with a recursive CTE
Tesla asked this in a 2025 data analyst technical round.
Write SQL that returns the first 15 Fibonacci numbers.
WITH RECURSIVE fib (n, value, next_value) AS (
SELECT 1, 0, 1
UNION ALL
SELECT n + 1, next_value, value + next_value
FROM fib
WHERE n < 15
)
SELECT n, value
FROM fib;MySQL requires WITH RECURSIVE whenever a CTE refers to itself. Leave out RECURSIVE and MySQL looks for a table named fib, then fails with error 1146.
Each CTE column takes its type from the anchor SELECT alone in MySQL. A string that grows in later rows gets truncated, or fails in strict mode, unless you widen it in the anchor with CAST('abc' AS CHAR(20)). Recursion also stops at cte_max_recursion_depth, 1,000 levels by default, which matters when you build a calendar of dates this way.
InnoDB, index, and EXPLAIN questions
The MySQL concept questions below cover InnoDB, indexes, and transactions. Visa's 2025 big data engineer interview asked about indexes and about DELETE, TRUNCATE, and DROP. Amazon's 2025 business intelligence engineer online assessment had 15 multiple-choice concept questions in MySQL syntax.
17. What's the difference between InnoDB and MyISAM?
InnoDB is MySQL's default storage engine, so assume it unless you're told otherwise. It supports transactions, row-level locking, and foreign keys. MyISAM supports none of the 3. Its table-level locking slows mixed read and write workloads, and it's mostly used for read-only or read-mostly tables.
| Feature | InnoDB | MyISAM |
|---|---|---|
| Transactions with commit and rollback | Yes | No |
| Locking | Row-level | Table-level |
| Foreign keys | Yes | No |
| Clustered index | Yes, on the primary key | No |
18. How does InnoDB's clustered primary key work?
InnoDB stores each table's rows in the primary key's index, called the clustered index. A lookup by primary key goes straight to the page that holds the row. Without a primary key, InnoDB uses the first UNIQUE index whose columns are all NOT NULL. Without either, it generates a hidden clustered index on a row ID.
Every secondary index entry stores the row's primary key columns, and InnoDB uses that key to fetch the row from the clustered index. A long primary key makes every secondary index bigger, so keep the primary key short.
19. What is a covering index, and how does EXPLAIN show it?
A covering index holds every column a query reads, which lets MySQL answer the query from the index without reading the table row. When the optimizer uses one, EXPLAIN shows Using index in the Extra column.
CREATE INDEX idx_orders_customer_date
ON orders (customer_id, order_date);
EXPLAIN
SELECT order_id, order_date
FROM orders
WHERE customer_id = 42;The index covers the query without listing order_id, as long as order_id is the primary key. InnoDB stores the primary key in every secondary index entry, which means the index already holds it.
20. Why does column order matter in a composite index?
MySQL can use any leftmost prefix of a multiple-column index. An index on (last_name, first_name) serves WHERE last_name = 'Jones' and filters on both columns. It can't serve WHERE first_name = 'John' on its own.
WHERE last_name = 'Jones' OR first_name = 'John' can't use the index for lookups either. When you design an index for a query, put the columns its filters always include at the front.
21. How do you read EXPLAIN output in MySQL?
MySQL's EXPLAIN returns one row for each table in the query. Check these 4 columns first:
type: ALL means a full table scan, and const, eq_ref, ref, and range read through an index.key: the index MySQL chose, or NULL if it found none to use.rows: the number of rows MySQL expects to examine, which for InnoDB is an estimate.Extra: Using index means a covering index, and Using filesort or Using temporary means an extra sort pass or a temporary table.
EXPLAIN ANALYZE runs the statement and reports actual timing next to the optimizer's expectations, in tree format. Use it to show where the estimate went wrong, and run it only on a statement that's safe to execute.
22. What is InnoDB's default isolation level?
InnoDB defaults to REPEATABLE READ, and PostgreSQL defaults to READ COMMITTED. InnoDB supports all 4 SQL standard levels: READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE.
Under REPEATABLE READ, consistent reads within one transaction read the snapshot taken at the first read. Under READ COMMITTED, each consistent read takes a fresh snapshot, so a second read in the same transaction can see newly committed rows.
23. How do DELETE, TRUNCATE, and DROP differ in MySQL?
Visa asked this in a 2025 big data engineer interview. DELETE removes the rows that match a WHERE clause and can be rolled back. DROP TABLE removes the table definition and all its data, and drops the table's triggers.
TRUNCATE TABLE empties a table by dropping and re-creating it, which is much faster than deleting row by row on a large table. In MySQL, it causes an implicit commit, so you can't roll it back, and it resets AUTO_INCREMENT to its start value. It also skips ON DELETE triggers and fails on an InnoDB table that another table references with a foreign key. PostgreSQL can roll back a TRUNCATE inside a transaction.
Practice MySQL interview questions
Practice each query shape with a timer, then rewrite your answer in MySQL syntax if your interview runs MySQL:
- Filter our SQL question bank by company, and work through questions with an editor and sample data for each one.
- Take the dates and bucketing and window functions lessons in our SQL interview course.
- Book a SQL mock interview to practice writing a query and explaining it at the same time.
For the same kind of questions in PostgreSQL syntax, see the PostgreSQL interview questions guide. The SQL interview questions and answers guide covers questions from Meta, Amazon, Google, and other companies.
MySQL interview FAQs
What's the difference between MySQL and SQL?
SQL is the query language, and MySQL is a relational database system that runs its own dialect of SQL. In an interview, the dialect gaps matter most: MySQL doesn't support FULL OUTER JOIN, NULLS FIRST or NULLS LAST, or DATE_TRUNC.
Do SQL interviews use MySQL or PostgreSQL?
Both appear in SQL interviews, and the dialect depends on the company and round. One DoorDash data engineer screen accepted only MySQL, and a 2026 Meta data engineer screen ran PostgreSQL. Ask your recruiter, and learn the date functions in both.
Which MySQL version should you prepare for?
Prepare for MySQL 8.0 or later. Window functions and CTEs arrived in 8.0. If the editor runs code, SELECT VERSION() returns the server version.
Is MySQL case-sensitive?
MySQL string comparisons are case-insensitive by default. The default collation, utf8mb4_0900_ai_ci, ignores case. 'abc' = 'ABC' is true, and LIKE 'a%' matches values that start with A. PostgreSQL compares strings case-sensitively.
Want to ace your Data Scientist interviews?
Try our Data Scientist interview course for mock interviews, frameworks, and more.
Start course for free →Get 1-1 coachingRelated Courses

Data Science Interview Prep Course
