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

Ausgedruckt am: 29.03.2024 um 08:03 Uhr

Mitglied: Kraemer
Kraemer 19.10.2018 um 14:52:44 Uhr
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
Mitglied: winlin
winlin 19.10.2018 um 14:58:57 Uhr
Goto Top
ahaaaaaa sehr geil....
sieht mssql sehr ähnlich der output face-smile

und das ist auch alles richtig so?? face-smile
Mitglied: it-frosch
Lösung it-frosch 19.10.2018 um 16:03:38 Uhr
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