![](/img/trans.png)
[英]SQL Server 'Operand type clash: int is incompatible with date' error
[英]SQL Server error Operand type clash: int is incompatible with date
我正在向我的表中插入值,但我陷入了Date
數據類型問題。 有誰知道如何解決這一問題?
create table filme
(
cod_filme int primary key,
titulo varchar (20),
ano int,
time int,
idioma varchar (20),
data_lancamento date,
país_lancamento varchar (20)
);
insert into filme values
(902, 'The Innocents', 1961, 100, 'English', '1962-02-19', 'SW'),
(903, 'Lawrence of Arabia', 1962, 216, 'English', '1962-12-11', 'UK'),
(904, 'The Deer Hunter', 1978, 183, 'English', '1979-03-08', 'UK'),
(905, 'Amadeus', 1984, 160, 'English', '1985-01-07', 'UK'),
(906, 'Blade Runner', 1982, 117, 'English', '1982-09-09', 'UK'),
(907, 'Eyes Wide Shut', 1999, 159, 'English', NULL,'UK'),
(908, 'The Usual Suspects', 1995, 106, 'English', '1995-08-25', 'UK'),
(909, 'Chinatown', 1974, 130, 'English', '1974-08-09', 'UK'),
(910, 'Boogie Nights', 1997, 155, 'English', '1998-02-16', 'UK'),
(911, 'Annie Hall', 1977, 93, 'English', '1977-04-20', 'USA'),
(912, 'Princess Mononoke', 1977, 134, 'Japanese', '2001-10-19', 'UK'),
(913, 'The Shawshank Redemption', 1994, 142, 'English', '1995-02-17', 'UK'),
(914, 'American Beauty', 1999, 122, 'English', NULL,'UK')
某些國際化設置可能會影響 YYYY-MM-DD 格式的日期解釋。
沒有連字符的格式 YYYYMMDD 始終有效。 因此,您可以嘗試'19950217'
而不是'1995-02-17'
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.