SQL Select Statement

Discussion in 'C#' started by user612345, Jun 22, 2010.

  1. user612345

    user612345 New Member

    Joined:
    Jun 22, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I'm trying to pass a SQL statement through C# but my SQL statement needs quotes around a table since the name of the table is also a proper SQL command(which I have no control over).

    Looking at MSDN I tried the following two methods but.

    string sqlSELECT = @"select * FROM tableNAME.""SELECT"";

    string sqlSELECT = "select * FROM tableNAME./"SELECT/"";

    The problem is that both of these statements above leave in slashes.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice