TRUNCATE TABLE在SQL CE 3.5中不起作用? [英] TRUNCATE TABLE does not work in SQL CE 3.5??

查看:114
本文介绍了TRUNCATE TABLE在SQL CE 3.5中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我感到很奇怪.

我正在使用SQL CE 3.5,想清除一个表.为此,我将SQLceCommand与' TRUNCATE TABLE包'

运行此程序时遇到一个奇怪的错误.

它说

解析查询时出错. (令牌行编号1,令牌行偏移量= 1,令牌错误= TRUNCATE')

当使用"DELETE FROM package"时,该表被清除.

但该表具有自动编号字段

CE不支持TRUNCATE关键字吗?

Peter

Hi

I came to soemthing strange.

I'm using SQL CE 3.5 and want to clear a table.

for that i used the SQLceCommand with 'TRUNCATE TABLE package'

When running this i got a strange error.

It says

There was an error parsing the query. (Token line number 1, Token line offset = 1, Token in error = TRUNCATE')

When using 'DELETE FROM package' the table is cleared.

But the table has an autonumber field which i want to reset, and i thought that is done with TRUNCATE.

Does CE does not support the TRUNCATE keyword?

Peter

推荐答案

你好彼得,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID = 4021594& SiteID = 1 .


这篇关于TRUNCATE TABLE在SQL CE 3.5中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆