# Fully type-safe raw SQL

TypedSQL is the best way to express the full power of SQL in queries. Fully type-safe, with auto-completion, and a fantastic DX for using raw SQL with Prisma.

[Get started with TypedSQL](/content/docs/orm/prisma-client/using-raw-sql/typedsql/index.html) [Read the announcement](/content/blog/announcing-typedsql-make-your-raw-sql-queries-type-safe-with-prisma-orm/index.html)

## End-to-end type-safety

All TypedSQL queries have typed inputs and outputs preventing errors related to incorrect types and improving DX. Any type mismatches can be caught right away, while type-safety significantly improves ergonomics while developing.

[Learn more about type-safety with TypedSQL](/content/docs/orm/prisma-client/using-raw-sql/typedsql/index.html)

## Full control of SQL

When you need the full control of the SQL engine, write and execute raw SQL queries directly. This gives you the flexibility to use advanced SQL-specific features and optimizations that are not available in the Prisma Client API, while maintaining type safety.

[Write queries using TypedSQL](/content/docs/orm/prisma-client/using-raw-sql/typedsql/index.html)

## Great DX

TypedSQL combines the productivity of a higher-level abstraction with type-safety for crafting SQL directly. Use familiar SQL tools in your editor, complete with syntax highlighting, error checking, and autocompletion.

## See TypedSQL in action

How To Write Raw SQL w/ Type Safety in Prisma ORM - YouTube

Tap to unmute

[How To Write Raw SQL w/ Type Safety in Prisma ORM](https://www.youtube.com/watch?v=ZwYcCti6CEs) [Prisma](https://www.youtube.com/channel/UCptAHlN1gdwD89tFM3ENb6w)

Prisma28.8K subscribers

## Expand your capabilities

Built on Prisma Client, TypedSQL pairs well with all Prisma products and features.

### Works alongside Prisma Schema & Migrate

TypedSQL complements Prisma Schema and Prisma Migrate. It extends the functionality you're already used to with type-safe SQL queries.

### Use with Prisma Accelerate

Continue using SQL queries while benefiting from products built for Prisma Client, such as connection pooling and caching provided by Accelerate.

## Raw SQL with type-safety and autocompletion

TypedSQL gives you even more flexibility and control in your database queries. Start using TypedSQL in any new or existing Prisma project.

[Try TypedSQL](/content/docs/orm/prisma-client/using-raw-sql/typedsql/index.html) [See an example](https://github.com/prisma/prisma-examples/tree/latest/orm/typedsql)
