作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
是否可以将 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');
最佳答案
您可以将其转换为 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;
使用:
请记住,并不总是可以做到 1:1。
wheels_replace
列似乎包含非原子数据 ('8 x 18 ET40|8 x 19 ET40'
)。
当您需要获取特定值或需要加入时,它可能会导致问题。
关于mysql - 如何将 mysql 转储导入 SQL Server 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36893838/
我是一名优秀的程序员,十分优秀!