Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
faq:migration-toolkit:fk-convert [2018/05/07 05:15] 127.0.0.1 external edit |
faq:migration-toolkit:fk-convert [2019/07/19 12:40] darya.prikhodkina |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | \\ | + | ====== How to Ensure that Foreign Key is Converted Successfully from MySQL to Microsoft SQL Server ====== |
- | [[http://www.ispirer.com|Ispirer Home Page]] | + | |
- | [[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] | + | |
- | [[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]] | + | |
- | ====== How to ensure that Foreign key is converted successfully from MySQL to MSSQL Server? ====== | + | |
Foreign keys in MySQL and in MSSQL has the same structure. | Foreign keys in MySQL and in MSSQL has the same structure. | ||
- | Structure of the Foreign key in the MSSQL: | + | Structure of the Foreign key in MSSQL: |
[ FOREIGN KEY ] | [ FOREIGN KEY ] | ||
REFERENCES [ schema_name . ] referenced_table_name [ ( ref_column ) ] | REFERENCES [ schema_name . ] referenced_table_name [ ( ref_column ) ] | ||
Line 12: | Line 8: | ||
[ ON UPDATE { NO ACTION | CASCADE | SET NULL | SET DEFAULT } ] | [ ON UPDATE { NO ACTION | CASCADE | SET NULL | SET DEFAULT } ] | ||
- | Structure of the Foreign key in the MySQL: | + | Structure of the Foreign key in MySQL: |
FOREIGN KEY [id] (index_col_name, ...) | FOREIGN KEY [id] (index_col_name, ...) | ||
REFERENCES tbl_name (index_col_name, ...) | REFERENCES tbl_name (index_col_name, ...) | ||
Line 18: | Line 14: | ||
[ON UPDATE {RESTRICT | CASCADE | SET NULL | NO ACTION}] | [ON UPDATE {RESTRICT | CASCADE | SET NULL | NO ACTION}] | ||
- | The only difference is RESTRICT word in MySQL database, that has no equivalent in MSSQL database. | + | The only difference is RESTRICT word in MySQL, that has no equivalent in MSSQL database. |
- | But in MySQL, foreign key constraints are checked immediately, so NO ACTION and RESTRICT are the same. | + | But in MySQL foreign key constraints are checked immediately, so NO ACTION and RESTRICT are the same. |
- | So during import there is no errors should arise. To check if conversion of the actions of the Foreign keys was successful you should check it in the database. | + | During import no errors should arise. To check if conversion of the actions of Foreign keys was successful, please check the database. |
\\ | \\ | ||
- | [[http://www.ispirer.com|Ispirer Home Page]] | + | ---- |
- | [[http://www.ispirer.com|Ispirer SQLWays Migration Product Page]] | + | === More about Ispirer Systems === |
- | [[http://www.ispirer.com/?click=RequestSQLWays&from=IspirerWIKI|Request SQLWays]] | + | [[https://www.ispirer.com|Ispirer Home Page]] |
+ | [[https://www.ispirer.com/products/database-migration|Database Migration]] | ||
+ | [[https://www.ispirer.com/application-conversion|Application Conversion]] | ||
+ | [[https://www.ispirer.com/download|Downloads]] |