PrismaP
Prisma2y ago
2 replies
bockster6669

Get part of a text from DB with Prisma

Is there a way to get the first 50 symbols from a String column content instead getting the all content of 300 symbols for example. I know there are
SELECT LEFT(content, 50) AS preview
FROM your_table;

SELECT SUBSTRING(content FROM 1 FOR 50) AS preview
FROM your_table;
What is the way in prisma?
Was this page helpful?