Databases · Junior · Question 41 of 75

What is the difference between varchar(255) and text in PostgreSQL?

Explanation

In PostgreSQL both are stored the same way. Use a CHECK constraint or varchar(n) when a limit is a real business rule.

Further reading

Problem with a question

Databases · Junior · question 41

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz