是否可以将mysql转储导入SQL Server数据库?我有一些语法问题。
我查看了一些文章,但没有人帮助过
这是转储的样子
CREATE TABLE IF NOT EXISTS `search_by_vehicle` (
`id` int(11) NOT NULL auto_increment,
`vendor` varchar(255) NOT NULL,
`car` varchar(255) NOT NULL,
`year` varchar(255) NOT NULL,
`modification` varchar(255) NOT NULL,
`param_pcd` varchar(32) NOT NULL,
`param_dia` varchar(8) NOT NULL,
`param_nut` varchar(32) NOT NULL,
`param_bolt` varchar(32) NOT NULL,
`tyres_factory` text NOT NULL,
`tyres_replace` text NOT NULL,
`tyres_tuning` text NOT NULL,
`wheels_factory` text NOT NULL,
`wheels_replace` text NOT NULL,
`wheels_tuning` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO search_by_vehicle (vendor, car, modification, year, tyres_factory, tyres_replace, tyres_tuning, wheels_factory, wheels_replace, wheels_tuning, param_pcd, param_nut, param_bolt, param_dia)
VALUES( 'Jaguar','S-Type','3.0i','1998','235/50 R17','245/40 R18|245/35 R19','','7.5 x 17 ET45','8 x 18 ET40|8 x 19 ET40','','5*108','12*1.5','','63.3');
答案 0 :(得分:1)
您可以将其转换为SQL Server
语法:
CREATE TABLE search_by_vehicle (
[id] int NOT NULL identity,
[vendor] varchar(255) NOT NULL,
[car] varchar(255) NOT NULL,
[year] varchar(255) NOT NULL,
[modification] varchar(255) NOT NULL,
[param_pcd] varchar(32) NOT NULL,
[param_dia] varchar(8) NOT NULL,
[param_nut] varchar(32) NOT NULL,
[param_bolt] varchar(32) NOT NULL,
[tyres_factory] varchar(max) NOT NULL,
[tyres_replace] varchar(max) NOT NULL,
[tyres_tuning] varchar(max) NOT NULL,
[wheels_factory] varchar(max) NOT NULL,
[wheels_replace] varchar(max) NOT NULL,
[wheels_tuning] varchar(max) NOT NULL,
PRIMARY KEY ([id])
) ;
INSERT INTO search_by_vehicle (vendor, car, modification, year, tyres_factory, tyres_replace, tyres_tuning, wheels_factory, wheels_replace, wheels_tuning, param_pcd, param_nut, param_bolt, param_dia)
VALUES( 'Jaguar','S-Type','3.0i','1998','235/50 R17','245/40 R18|245/35 R19','','7.5 x 17 ET45','8 x 18 ET40|8 x 19 ET40','','5*108','12*1.5','','63.3');
SELECT *
FROM search_by_vehicle;
的 LiveDemo
强>
使用:
请记住,并非总是可以1:1执行此操作。
看起来列wheels_replace
具有非原子数据('8 x 18 ET40|8 x 19 ET40'
)。
当您需要获取特定值或需要加入时,它可能会导致问题。