INSERT [dbo].[ProductPrice] ([Id], [CreatedDate], [ProductId], [ProductType], [ItemPrice])
VALUES (N'45bf8262-cc13-480e-b85a-0015860071aa',
CAST(N'2017-04-04 12:18:29.993' AS DateTime),
N'bb08c494-6f1e-4410-ac02-4c90ef46ef6a', 2,
CAST(600.0000 AS Decimal(18, 4)))
INSERT [dbo].[Rule] ([Id], [CreatedDate], [ProductType], [Condition], [Calculation], [Hrid])
VALUES (N'1c3af075-449f-4db9-bd46-06de73a60a84',
CAST(N'2017-07-20 10:51:00.910' AS DateTime),
2, N'HasTenDiscount', N'0.9*[InitialPrice]', N'ten-discount')
如何插入数据?
答案 0 :(得分:0)
DateTime
数据类型替换为timestamp
一个N
的字符串之前替换E
,或者只删除它N'0.9*[InitialPrice]'
,但请记住,使用此类表达式的过程需要"翻译"以及INTO
声明INSERT
醇>
https://www.postgresql.org/docs/current/static/sql-insert.html