Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7868941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:09:16+00:00 2026-06-03T01:09:16+00:00

Having been unable to find a linux based SQL beautifier to pipe my mySQL

  • 0

Having been unable to find a linux based SQL beautifier to pipe my mySQL snippets to, I will settle for simply tabularizing my mySQL code. I want to turn this:

CREATE TABLE IF NOT EXISTS GROUP
(
   ID INT NOT NULL AUTO_INCREMENT,
   GROUPNAME VARCHAR(15) UNIQUE,
   ACTIVE BOOLEAN DEFAULT TRUE,

   PRIMARY KEY(ID)
)ENGINE=InnoDB

into this

CREATE TABLE IF NOT EXISTS GROUP
(
   ID         INT NOT NULL AUTO_INCREMENT,
   GROUPNAME  VARCHAR(15) UNIQUE,
   ACTIVE     BOOLEAN DEFAULT TRUE,

   PRIMARY KEY(ID)
)ENGINE=InnoDB

But if I do :Tabularize /\ I get

CREATE TABLE IF NOT EXISTS GROUP
(
        ID          INT           NOT        NULL         AUTO_INCREMENT,
        USERID      INT           NOT        NULL,
        GROUPNAME   VARCHAR(15)   UNIQUE,
        ACTIVE      BOOLEAN       DEFAULT    TRUE,

        PRIMARY     KEY(ID),
        FOREIGN     KEY           (USERID)   REFERENCES   USER(ID)
)ENGINE=InnoDB

How do I only align on the first space after the identifier (or alternatively, where do I find a command line SQL beautifier = ) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:09:17+00:00Added an answer on June 3, 2026 at 1:09 am

    To avoid Tabularize repeating your pattern to match other fields, you have to
    anchor it. At the beginning makes more sense in this case, so you can try
    something like this:

    :Tab /^\s*\w*
    

    There is only one field with this pattern in your line. But be careful — it
    might not happen in your example, but this matches the big majority of lines,
    thus it might be a good idea to apply Tabularize only in a range (either
    explicitly or by selecting the lines in visual mode).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having been spoiled by ruby for so long, I now find myself having to
I've been looking into this for a while and have been unable to find
I've been trying to make a for loop that will iterate based off of
Surprisingly I've been unable to find anyone else really doing this, but surely someone
Having been an imperative developer for some years now, I had never had the
Having been given the all clear to move code from my Page_Loaded method to
I have been struggling with this for quite some time having been accustomed to
I'm trying to use MVC for a new project after having been around the
Been having some trouble implementing a single-column index in LaTeX. I've been employing the
I've been having some trouble with vs2008 SP1 running in debug mode when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.