SELECT * — read every column
Return every column for every row in the table. Use sparingly on wide tables; LIMIT is encouraged.
curl -X POST "$ENGINE/v1/tenants/$T/sql" \
-H "Authorization: Bearer $OC_TOKEN" \
-H "Content-Type: application/json" \
-d @- <<'JSON'
{
"sql": "SELECT * FROM shop.customers LIMIT 3"
}
JSON {
"rows": [
{ "id": "c_1", "email": "alice@example.com", "region": "IN", "tier": "gold" },
{ "id": "c_2", "email": "bob@example.com", "region": "US", "tier": "silver" },
{ "id": "c_3", "email": "carol@example.com", "region": "DE", "tier": "gold" }
],
"count": 3,
"elapsed_ms": 3
}