Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
context.Database.ExecuteSqlCommand("Delete from RIGHT where Role_ID ="+roleID );



Please help ??
Posted

if RIGHT is a tablename, you use a keyword as table name in that case your query will be:
C#
context.Database.ExecuteSqlCommand("Delete from [RIGHT] where Role_ID ="+roleID );
 
Share this answer
 
Comments
Ashok19r91d 17-May-14 3:40am    
Your query will help in case of SQL Server DB, For MySQL Database we've to use "`" Key before to Number 1.
RIGHT is a SQL Keyword, So considrer using
For MySQL use `RIGHT`
For Microsoft SQL Server use [RIGHT]

It'll Work.

Accept as Solution, If this help you in any way...
Thanks.
 
Share this answer
 
RIGHT is a SQL keyword, So Consider using

For MySQL Database use `RIGHT`
For Microsoft SQL server use [RIGHT]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900