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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:26:09+00:00 2026-06-15T06:26:09+00:00

I have a MSSQL queries file(.sql), now I need to convert it to MYSQL

  • 0

I have a MSSQL queries file(.sql), now I need to convert it to MYSQL queries.
Please help me. The script like this:

CREATE TABLE [dbo].[Artist](
    [ArtistId] [int] IDENTITY(1,1) NOT NULL,
    [Name] [nvarchar](120) NULL,
PRIMARY KEY CLUSTERED 

(
    [ArtistId] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]
  • 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-15T06:26:10+00:00Added an answer on June 15, 2026 at 6:26 am

    If you want to convert the DDL by hand, then you can do this by building up rules on a case by case basis, e.g. as follows:

    • [] need to be replaced with backticks
    • IDENTITY(1,1) can be replaced with AUTO_INCREMENT
    • Most of the ANSI options and Device settings
      can be ignored (these seem to be present only because the table has
      been rescripted)
    • w.r.t. dbo, MySQL doesn’t implement schemas in the same way as SQL Server – you will either need to separate schemas into databases, or drop the schema, or mangle the schema name into the tablename (e.g. as a Prefix)

    This will leave you with something like the following:

    CREATE TABLE `Artist`(
        `ArtistId` int NOT NULL AUTO_INCREMENT,
        `Name` nvarchar(120) NULL,
        PRIMARY KEY CLUSTERED 
        (
           `ArtistId` ASC
        )
    );
    

    Fiddle here

    However, it is usually much easier to do this migration with a migration tool – search for the section on How to Transition from SQL Server to MySQL

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

Sidebar

Related Questions

I have two mysql queries: $sql = SELECT * FROM content WHERE threadName LIKE
Good morning, I have mysql queries where I would like to calculate percentage of
I have a Python script that queries a MySQL database every 5 seconds, gathering
On a webserver, I have a php script that parses a .sql file (which
I have some set of SQL queries which is in a file(i.e query.sql), and
i have an sql file of the following form: CREATE VIEW dbo.SomeView AS select
I have some benchmark queries in a .sql file. If i use source in
I have a 400MB *.sql file which is a dump from a MySQL database.
I have a .sql file containing a bunch of SQL queries, with each query
I have tried several mySQL queries to compare a column of dates stored as

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.