Skip to content

How to perform Raw SQL queries on different schemas? #9491

Closed Answered by bastianhilton
bastianhilton asked this question in Question
Discussion options

You must be logged in to vote

Found the answer on HasuraHQ Discord:

CREATE TABLE "commerce"."products" (
id INT PRIMARY KEY,
name VARCHAR(255),
price DECIMAL(10, 2),
description TEXT
);

"commerce" is the name of the schema and products is the name of the table.

To select a schema you would do something like this:

SELECT * from "users"."user_details"

SELECT * from "public"."articles"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bastianhilton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant