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 8357525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:30:22+00:00 2026-06-09T10:30:22+00:00

The deployment procedures in my company require that SQL scripts for creation of procedures

  • 0

The deployment procedures in my company require that SQL scripts for creation of procedures and tables, etc. be bare.

Generating create scripts in SQL Server Management Studio gives you significantly more than a bare script, which is unfortunate in this case. For example, for a test table this is what SSMS generated for me:

USE [DemoDB]
GO

/****** Object:  Table [dbo].[example]    Script Date: 08/07/2012 15:46:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[example](
    [fake_row] [int] NULL
) ON [PRIMARY]

GO

So, what I’d like to know is:

Can I somehow run a query on SQL Server in SSMS that would give me a script that was literally just the following?

create table example (
    fake_row int
)
  • 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-09T10:30:23+00:00Added an answer on June 9, 2026 at 10:30 am

    Apologies for the self-answer, marking other good answers +1.

    It turns out you can get pretty much all of the way there with utility in SSMS.

    1. Right click on the database in the object explorer
    2. Click “Tasks”
    3. Click “Generate Scripts”
    4. Select “Script Specific Objects” and choose tables, or whatever else
    5. Select “Save To File” & “Single File Per Object” (or just spool to query window)
    6. Click “Advanced” and you can enable/disable the generation of virtually every part of the statements you’re generating including constraints, use statements, etc.
    7. If further removal is required (e.g. removing GO), it’s minimal
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if there is any civilized method of assembling SQL deployment scripts
I've got some deployment scripts that automate cloning of a repository to a local
I have a project that requires me to do development in SQL Server 2005,
I have a capistrano deployment that seems to be working fine, however after the
I'm writing a deployment script that saves timestamped backup files to a backups directory.
I have read these very good questions on SO about SQL stored procedures: When
I really like the new SQL Server Database projects in Visual Studio 2010. I
I have some stored procedures to execute that use dbms_output.put_line() to put data into
I'm looking for some Best Practices for automating the deployment of Stored Procedures/Views/Functions/Table changes
How do you deal with source control management and automated deployment (configuration management) of

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.