Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8068473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:42:08+00:00 2026-06-05T12:42:08+00:00

In SQL Server Compact Edition in Visual Studio 2010 (maybe SQL Server and SQL

  • 0

In SQL Server Compact Edition in Visual Studio 2010 (maybe SQL Server and SQL in general, I don’t know), this command works:

DELETE FROM foods WHERE (name IN ('chickens', 'rabbits'))

but this command produces an error of: Error near identifier f. Expecting OUTPUT.

DELETE FROM foods f WHERE (f.name IN ('chickens', 'rabbits'))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:42:12+00:00Added an answer on June 5, 2026 at 12:42 pm

    To alias the table you’d have to say:

    DELETE f FROM dbo.foods AS f WHERE f.name IN (...);
    

    …though I fail to see the point of aliasing for this specific statement, especially since (at least IIRC) this no longer conforms to strict ANSI, may cause unnecessary hurdles when writing for multiple platforms, and it introduces complexity and confusion for new users learning the basics of vanilla DML.

    This will do and doesn’t require an alias:

    DELETE dbo.foods WHERE name IN (...);
    

    But yes, as comments suggest, it may be necessary for other query forms (e.g. any DML combined with correlation, joins, EXISTS, etc). In SQL Server you can do this using, for example:

    DELETE f
      FROM dbo.foods AS f
      INNER JOIN dbo.allergies AS a
      ON f.FoodId = a.FoodId;
    

    Just keep in mind this query may have to be constructed differently on {not SQL Server}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to use SQL Server Compact Edition with Entity Framework in Visual Studio
I Want Print DataBase Schema in Microsoft Sql Server Compact Edition. Maybe Exist Some
I have this question in which I have a SQL Server Compact Edition database
I Use a Sql Server Compact Edition Database File For Store the Data in
I am using LINQ to SQL with Sql Server Compact Edition 3.5 and VS2008.
I've tried to run the application in two situations: with SQL Server compact edition
Does anyone know the best way to create a SQL Server CE (Compact 3.5)
I'm new to SQL Server Compact edition. I'm using Compact edition 3.5. I tried
It doesn't look like SQL Server Compact Edition supports the RANK() function. (See Functions
Trying to use nhibernate on sql-server compact edition for unit testing and having some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.