Skip to content

Any difference between :param and @param? #825

@h1112918

Description

@h1112918

There are two ways to add parameters:

command.CommandText = "SELECT * FROM mytable WHERE Id = :Id";
command.Parameters.AddWithValue("Id", id);

and

command.CommandText = "SELECT * FROM mytable WHERE Id = @Id";
command.Parameters.AddWithValue("@Id", id);

Is there any difference in both methods in performance or something else? I also think the difference (if any) should be mentioned in the project Wiki.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions