如何将 news.time 设置为一年?我想找到 2012 年。
SELECT
news.id,
news.Categoryid,
news.newsid,
news.Languageid,
news.createtime,
news.tags,
news.topic,
news.sub_topic,
news.[time],
news.content_s,
[Language].Languagename,
Category.Categorysubid
FROM
(
news
INNER JOIN
[Language]
ON news.Languageid = [Language].Languageid
), Category
我尝试了这段代码,但它不起作用:
SELECT
news.id,
news.Categoryid,
news.newsid,
news.Languageid,
news.createtime,
news.tags,
news.topic,
news.sub_topic,
news.[time],
news.content_s,
[Language].Languagename,
Category.Categorysubid
FROM
(
news
INNER JOIN
[Language]
ON news.Languageid = [Language].Languageid
), Category
WHERE ( YEAR(news.[time]) = YEAR(?) )