winlin
Goto Top

MSSQL Skripte nach MySQL migrieren

Hallo Commuity

ich habe einige MSSQL Skripte (*.sql). Gibt es Tools um diese in mysql skripte umzuwandeln?
ODer brauche ich einen DB Spezialisten um das zu machen face-smile Würde es gerne selber machen aber dafür reichen meine DB Kenntnisse nicht aus face-sad

DAs wäre eines davon "create table":
--Create Table
IF NOT EXISTS (
    SELECT  1
    	FROM    information_schema.tables
    	WHERE   table_name = '{{tableName}}'  
    	AND TABLE_SCHEMA = '{{schemaName}}'  
)
BEGIN
    CREATE TABLE {{schemaName}}.{{tableName}}
    (
        id NCHAR(20) PRIMARY KEY not null,
        counter VARBINARY(8) not null,
        create_date DATETIME not null,
        update_date DATETIME not null
    )
END;

Content-Key: 390116

Url: https://administrator.de/contentid/390116

Printed on: April 20, 2024 at 13:04 o'clock

Member: Kraemer
Kraemer Oct 19, 2018 at 12:52:44 (UTC)
Goto Top
ungefähr so?
-- Create Table
IF NOT EXISTS (
    SELECT  1
    	FROM    information_schema.tables
    	WHERE   table_name = '{{tableName}}'  
    	AND TABLE_SCHEMA = '{{schemaName}}'  
)
THEN
    CREATE TABLE {{schemaName}}.{{tableName}}
    (
        id NCHAR(20) PRIMARY KEY not null,
        counter VARBINARY(8) not null,
        create_date DATETIME not null,
        update_date DATETIME not null
    )
END IF;;

http://www.sqlines.com/online
Member: winlin
winlin Oct 19, 2018 at 12:58:57 (UTC)
Goto Top
ahaaaaaa sehr geil....
sieht mssql sehr ähnlich der output face-smile

und das ist auch alles richtig so?? face-smile
Member: it-frosch
Solution it-frosch Oct 19, 2018 at 14:03:38 (UTC)
Goto Top
Hallo winlin,

beides sind SQL Dialekte.

sieht mssql sehr ähnlich der output
und das ist auch alles richtig so??

Also nimm dir die Syntax von MSSQL und vergleiche sie mit der Syntax von MySQL.
Es gibt viele Seiten im Netz die die Syntax jedes Dialekts beschreiben.

MSSQL:
https://docs.microsoft.com/de-de/sql/t-sql/language-reference?view=sql-s ...

MySQL:
https://www.tutorialspoint.com/mysql/

grüße vom it-frosch
Member: AlexKirpichny
AlexKirpichny Apr 16, 2024 at 10:53:26 (UTC)
Goto Top
Hier ist ein Tool für die automatische SQL- und Datenmigration
vielleicht ist es für Sie nützlich.