Parameterized Query

Định nghĩa Parameterized Query là gì?

Parameterized QueryTham số truy vấn. Đây là nghĩa tiếng Việt của thuật ngữ Parameterized Query - một thuật ngữ thuộc nhóm Technology Terms - Công nghệ thông tin.

Độ phổ biến(Factor rating): 5/10

Một truy vấn tham số là một loại truy vấn SQL mà đòi hỏi ít nhất một tham số để thực hiện. Một giữ chỗ thường được thay thế cho tham số trong truy vấn SQL. sau đó các tham số được truyền cho các truy vấn trong một tuyên bố riêng biệt.

Xem thêm: Thuật ngữ công nghệ A-Z

Giải thích ý nghĩa

Một lý do chính cho việc sử dụng các truy vấn tham số là họ làm cho các truy vấn dễ đọc hơn. Thứ hai và hầu hết các lý do thuyết phục là truy vấn tham số giúp đỡ để bảo vệ cơ sở dữ liệu từ SQL injection attacks.The sau là một ví dụ về ADO.NET tham số truy vấn: SELECT LastName FROM Liên hệ ĐÂU ContactID = @ContactID; @ContactID là tham số này truy vấn, mà có thể được định nghĩa trong một tuyên bố tiếp theo tương tự như sau: command.Parameters.Add (SqlParameter mới ( "@ ContactID", theContactID));

What is the Parameterized Query? - Definition

A parameterized query is a type of SQL query that requires at least one parameter for execution. A placeholder is normally substituted for the parameter in the SQL query. The parameter is then passed to the query in a separate statement.

Understanding the Parameterized Query

One major reason for using parameterized queries is that they make queries more readable. The second and most compelling reason is that parameterized queries help to protect the database from SQL injection attacks.The following is an example of an ADO.NET parameterized query:SELECT LastName FROM Contacts WHERE ContactID = @ContactID;@ContactID is the parameter for this query, which might be defined in a subsequent statement similar to the following: command.Parameters.Add(new SqlParameter("@ContactID", theContactID));

Thuật ngữ liên quan

  • Data
  • Query
  • Enterprise Manager
  • Structured Query Language (SQL)
  • Parameter (param)
  • Record
  • SQL Injection
  • .NET Framework (.NET)
  • Query Language
  • Commit

Source: ? Technology Dictionary - Filegi - Techtopedia - Techterm

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *