oracle-dbWrite Oracle SQL and PL/SQL with proper syntax, hints, and performance patterns.
Install via ClawdBot CLI:
clawdbot install ivangdavila/oracle-dbROWNUM for limiting rows—WHERE ROWNUM <= 10; 12c+ supports FETCH FIRST 10 ROWS ONLYDUAL table for expressions—SELECT sysdate FROM dualVARCHAR2 not VARCHAR—VARCHAR is reserved, VARCHAR2 is the standard||—not CONCAT for multiple values'' IS NULL is true; breaks logic from other databasesSELECT * FROM (SELECT ... ORDER BY x) WHERE ROWNUM <= 10SELECT FROM (SELECT a., ROWNUM rn FROM (...) a WHERE ROWNUM <= 20) WHERE rn > 10OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY—cleaner, use when availableNVL(col, default) for null replacement—faster than COALESCE for two argsNVL2(col, if_not_null, if_null) for conditional—common Oracle patternLENGTH('') returns NULL, not 0NULLIF(a, b) returns NULL if equal—useful for avoiding division by zeroSYSDATE for current datetime—no parenthesesTO_DATE('2024-01-15', 'YYYY-MM-DD') for string to date—format requiredTO_CHAR(date, 'YYYY-MM-DD HH24:MI:SS') for date to stringSYSDATE + 1 is tomorrow, SYSDATE + 1/24 is one hourCREATE SEQUENCE seq_name START WITH 1 INCREMENT BY 1seq_name.NEXTVAL—SELECT seq_name.NEXTVAL FROM dualseq_name.CURRVAL—only after NEXTVAL in same sessionGENERATED ALWAYS AS IDENTITYCONNECT BY PRIOR child = parent for tree traversalSTART WITH parent IS NULL for root nodesLEVEL pseudo-column shows depth—WHERE LEVEL <= 3 limits depthSYS_CONNECT_BY_PATH(col, '/') builds path string:variable_name syntaxCURSOR_SHARING=FORCE as workaround but not recommended long-term/+ INDEX(table idx_name) / forces index use/+ FULL(table) / forces full table scan/+ PARALLEL(table, 4) / enables parallel querySELECT /+ hint /—common placement after SELECT keywordBEGIN ... END; with / on new line to executeDBMS_OUTPUT.PUT_LINE() for debug output—SET SERVEROUTPUT ON firstEXCEPTION WHEN OTHERS THEN—always handle or logEXECUTE IMMEDIATE 'sql string' for dynamic SQL—beware injectionCOMMIT explicitlySAVEPOINT name then ROLLBACK TO name for partial rollbackCREATE TABLE commits any pending transactionSELECT FOR UPDATE WAIT 5 waits 5 seconds for lock—avoids indefinite hangEXPLAIN PLAN FOR sql; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY)—shows planV$SQL and V$SESSION for monitoring—requires privilegesSELECT *—fetches all columns including LOBs/+ INDEX(t idx) /MINUS instead of EXCEPT—Oracle uses MINUS for set differenceDECODE is Oracle-specific—use CASE for portabilityWHERE num_col = '123' works but prevents index useROWID is physical—don't store or rely on across transactionsGenerated Mar 1, 2026
Generating daily transaction reports with pagination for large datasets, using ROWNUM or FETCH FIRST for performance. Implementing hierarchical queries to analyze organizational structures in financial data, with proper NULL handling for empty values.
Managing order sequences with Oracle sequences for unique order IDs, handling date arithmetic for shipping estimates, and using bind variables in PL/SQL blocks to process transactions efficiently while preventing SQL injection.
Querying patient history with hierarchical CONNECT BY queries for family medical trees, using NVL/NVL2 for handling missing data, and implementing pagination for browsing large medical record sets with proper transaction control.
Monitoring inventory levels with real-time queries using SYSDATE for timestamping, implementing performance hints for large inventory tables, and using DECODE or CASE statements for status categorization across multiple warehouses.
Processing billing cycles with PL/SQL blocks for complex calculations, using TO_DATE and TO_CHAR for date formatting in invoices, and implementing SAVEPOINT and ROLLBACK for error recovery during batch billing operations.
Selling Oracle database licenses to large corporations for mission-critical applications, with annual maintenance fees and optional premium support packages. Revenue comes from per-core licensing models and additional tools like Oracle Enterprise Manager.
Providing specialized Oracle SQL and PL/SQL development services, performance tuning, and migration assistance from other databases. Revenue streams include hourly consulting rates, fixed-price projects, and retainer agreements for ongoing support.
Building and hosting software-as-a-service applications using Oracle Autonomous Database, with subscription-based pricing tiers. Revenue generated from monthly/user fees with premium features for advanced Oracle-specific functionality like hierarchical queries and PL/SQL automation.
đź’¬ Integration Tip
Ensure sqlplus or SQL binaries are available in the system PATH, and set SERVEROUTPUT ON for PL/SQL debugging output. Use bind variables in all dynamic SQL to prevent hard parsing and improve performance.
Use the @steipete/oracle CLI to bundle a prompt plus the right files and get a second-model review (API or browser) for debugging, refactors, design checks, or cross-validation.
Manage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database). Use when a user asks Clawdbot to add a task to Things, list inbox/today/upcoming, search tasks, or inspect projects/areas/tags.
Local search/indexing CLI (BM25 + vectors + rerank) with MCP mode.
Use when designing database schemas, writing migrations, optimizing SQL queries, fixing N+1 problems, creating indexes, setting up PostgreSQL, configuring EF Core, implementing caching, partitioning tables, or any database performance question.
Connect to Supabase for database operations, vector search, and storage. Use for storing data, running SQL queries, similarity search with pgvector, and managing tables. Triggers on requests involving databases, vector stores, embeddings, or Supabase specifically.
Query, design, migrate, and optimize SQL databases. Use when working with SQLite, PostgreSQL, or MySQL — schema design, writing queries, creating migrations, indexing, backup/restore, and debugging slow queries. No ORMs required.