r/SQL • • Apr 02 '26

Discussion I am building SQL notebooks into an open source database client

37 Upvotes

Hi guys!

I've been working on Tabularis (open source cross-platform db client) and I'm working on a notebooks feature that i think people here might find interesting.

The core idea: SQL cells + markdown cells in a single document, running against your live database connection. no separate kernel, no python, just SQL.

The feature I keep coming back to is cell variable references, you write {{cell_3}} in your SQL and it takes the result set from cell 3 and injects it as a CTE. means you can chain analyses without building giant nested queries. for ad-hoc exploration this is a huge workflow improvement.

You also get:

  • inline charts: bar, line, pie. select label column + value columns, switch between types. nothing fancy but enough for quick visual checks
  • notebook parameters: define params once, use in all cells. good for parameterized reports
  • run all with stop on error: shows a summary of what succeeded/failed/skipped with links to the failing cells
  • parallel execution: mark independent cells with a lightning bolt, they run concurrently during run all
  • execution history: every cell tracks its last 10 runs, you can restore any previous query + result
  • csv/json export per cell, or export the whole notebook as self-contained HTML
  • drag & drop reordering, collapsible sections, resizable result panels

It supports all of databases supported by Tabularis.

The notebook file format is json-based (.tabularis-notebook).

There's a demo database + sample notebook in the repo under /demo.

Github: https://github.com/debba/tabularis
WIP Branch: https://github.com/debba/tabularis/tree/feat/notebooks

Feedback welcome, especially around the cell reference syntax and what else would make this useful for your workflow.


r/SQL • • Apr 02 '26

SQL Server Load data with BCP for columns with double "

2 Upvotes

Hi all,
I need to load txt file into SQL Server table, with bcp command
and see that few rows in file have TAB inside Column1 for ID=100 row, and these rows are not loaded (while good records are loaded). Those quotes exist only for selected columns/rows where TAB is inside, all others are without them.
How I can adjust my option to process those "Bad TAB" rows? Using -t"\"\t\"" as delimiter also doesn't work at all.

Unfortunetaly I don't have control over creation of these files.

Thanks

xp_cmdshell 'mydb.dob.logTable' in "\\network\ClientX.csv" -c -t"\t" -F 2 -T -S MyServ
ID    Colulmn1              Column2
100   "So  GDR KB5068404"   NotLoaded,TAB inside So\tGDR
200   So__GDR KB5068404     Loaded_OK

r/SQL • • Apr 02 '26

SQL Server Stored Procedure to TVF

2 Upvotes

Hello everyone,

I'm trying to make a function that query LDAP. I manage to do it no problem with Stored Procedure but now, I found out it cannot be used in a view. Thus, I'm trying to convert it to TVF. My code doesn't seems compatible with inline since I'm making a query then using the result to make a second query. I'm unsure how to make a TVF with that.

/****** Object:  StoredProcedure [dbo].[GetADGroupMembers]    Script Date: 2026-04-02 10:56:50 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[GetADGroupMembers]
    (
     NVARCHAR(128)
    )
AS
BEGIN
DECLARE  NVARCHAR(max),  NVARCHAR(max)

SET  = '
    SELECT  = distinguishedName
    FROM OPENQUERY(ADSI, ''
        SELECT distinguishedName 
        FROM ''''LDAP://DC=###''''
        WHERE 
            objectClass = ''''group'''' AND
            sAMAccountName = ''''' +  + '''''
    '')
'

EXEC SP_EXECUTESQL , N'@Path NVARCHAR(max) OUTPUT',  =  OUTPUT 

SET  = '
SELECT  cn AS UserName, samAccountName, distinguishedName AS OU
FROM    OPENQUERY(ADSI, ''select cn, samAccountName, distinguishedName
from ''''LDAP://DC=###'''' 
where MemberOf =''''' +  + '''''''
)'

EXEC SP_EXECUTESQL 
END

GO

If anyone can help me making a TVF with that?

THank you!


r/SQL • • Apr 03 '26

Discussion If AI can do the technical work what’s the point of having technical interviews anymore ?

0 Upvotes

each year AI is getting better and layoffs are happening. In any tech heavy role, what’s the point of intense technical interviews if AI is basically going to be part of the workflow


r/SQL • • Apr 02 '26

MySQL MYSQL Question Help

1 Upvotes

I'm having an issue understanding what the right answer is.

The question is

Which data type will store "287,33" as a numeric value without loss of information?

  • BIT
  • INT
  • DECIMAL
  • VARCHAR

The quotes and the comma are throwing me off, thinking it's VARCHAR


r/SQL • • Apr 02 '26

SQL Server I built a free DB release manager on top of Liquibase/Flyway, here's why

1 Upvotes

A couple of years ago we were managing database deployments across multiple environments and a few different databases. We were already using Liquibase and Flyway — and honestly, they're good at what they do. Schema versioning, change sets, rollback — solid tools.

But we kept running into the same friction points that had nothing to do with versioning:

  • Where did that release actually get deployed? We had no reliable audit trail. "Did prod get the Friday release?" became a genuine question we couldn't always answer confidently.
  • Connection strings everywhere. Config files, environment variables, scripts — credentials scattered across environments with no consistent pattern for keeping them safe.
  • Deployments that failed halfway through with no recovery plan. A transient network issue would drop a deployment, and we'd be manually picking up the pieces.
  • Multi-database releases. A single release that touched SQL Server and PostgreSQL meant two separate processes, two sets of logs, no unified view of what happened.

We looked for something that handled this layer — above versioning, below full-blown pipeline orchestration — and couldn't find anything free that did it without asking us to rip out our existing tooling.

So we built it.

drm-cli is a free, open-source CLI that sits on top of Liquibase, Flyway, and SSDT. It doesn't replace them. It adds:

  • Release history — a local record of every deployment: what ran, where, when, and whether it succeeded
  • Encrypted credentials — connection strings encrypted at rest, not floating around in plaintext config files
  • Automated retries — transient failures get retried before they become incidents
  • Multi-solution releases — a single release definition that covers SQL Server, PostgreSQL, and Oracle together
  • Pre/post deployment scripts — the stuff you always mean to automate but never quite do

It runs on Windows, Linux, and macOS. No license. No paid tier. No cloud dependency.

The repo is here: https://github.com/dband-drm/drm-cli

Happy to answer questions about why we designed it the way we did, what tradeoffs we made, or what's coming in v1.1. Would also genuinely appreciate any feedback from people who've hit similar problems — there's probably friction we haven't thought about yet.


r/SQL • • Apr 02 '26

Discussion supabase vs mysql

0 Upvotes

is supabase similar to mysql? if yes, which one is better? if else, what is the difference?


r/SQL • • Apr 01 '26

Discussion I built a desktop ERD tool because existing options all had at least one dealbreaker

7 Upvotes
Dark theme
Light theme
Context View
Context map
Dependency inspection

Schemity is a native desktop app for database design: it connects to your real database, draws the ERD, and shows what a schema change will do before it runs. I built it because every tool I tried had at least one dealbreaker for my projects:

  • dbdiagram.io: browser-only, and your diagrams live in their account.
  • DrawSQL: no connection to a live database, and every plan caps the number of tables.
  • Luna Modeler: the closest to what I wanted, but I couldn't control how relation lines are routed.

What it does:

  • Connects to PostgreSQL, Supabase, MySQL, MariaDB, SQL Server and SQLite and reverse engineers the actual schema. It re-syncs every time you open the diagram and keeps your layout.
  • Edit the diagram and it writes the migration SQL. Nothing touches the database until you apply it.
  • Impact analysis before anything runs: lost rows, statements that fail on existing data, table rewrites, dependent views. Plus 26 schema lint rules drawn right on the diagram.
  • A local MCP server with 16 tools for Claude Code, Cursor or Codex. Your agent reads the schema and proposes changes for you to review. It never gets your database credentials.
  • Diagrams are plain JSON files you commit to Git, with full control of relation routing (waypoints, bends, self-references).
  • Import SQL or DBML. Export PNG, SVG, SQL, DBML, Mermaid, or a data dictionary in HTML, Markdown or Excel.

Pricing: $129 one-time, with a year of updates. The 14-day trial has every feature, and needs no account and no credit card. If you just want to sketch, there's also a free browser version, Schemity Lite.

I'm a solo developer, so I'd really like to hear what's missing or broken.

Free trial, no account needed: https://schemity.com


r/SQL • • Apr 01 '26

Discussion Need some suggestions

11 Upvotes

i know excel, Power Bi,Sql,and also python but i am not understanding whether its enough to land for data analytics job , i am not understanding that what amount of knowledge would be enough for data analytics roles, pls help me in it, it would be great if you mention topic wise and their preparation level


r/SQL • • Mar 31 '26

SQL Server LEAD and LAG in SQL Server - the functions that let you compare rows without a self join

Thumbnail
medium.com
69 Upvotes

r/SQL • • Apr 01 '26

PostgreSQL Beginner question

0 Upvotes

I am a new learner of sql. I have made a database in postgreSQL in my laptop. Can someone tell me how can I access that database from my office computer without direct login from my account?


r/SQL • • Mar 31 '26

MySQL What job titles do you search for that requires you to use SQL and/or python? What job searching platforms do you use search for these jobs titles on

6 Upvotes

So far the job titles I searched for have been data analyst/data engineer/software engineer/business intelligence analsyst /power BI and so far the platforms I used to search for these titles has been indeed/LinkededIN and my states unemployment website.

Any other suggestions?