Processing.. Please wait.

SQl Notes & Rules

ExecuteScalar() only returns the value from the first column of the first row of your query.(in case of select query use ExecuteScalar)

ExecuteReader() returns an object that can iterate over the entire result set.

ExecuteNonQuery() does not return data at all: only the number of rows affected by an insert, update, or delete.

Why we should write @ before sql queries in asp.net?

It's a verbatim string. This means newlines are preserved and escape sequences ignored.

  • Always keep functions(such as insert,update ,delete,select,order by and joins) in sql query write in capital letters.
  • Always write parameterized query.

What is parameterized  query?

Parameterized SQL queries allow you to place parameters in an SQL query instead of a constant value. A parameter takes a value only when the query is executed, which allows the query to be reused with different values and for different purposes.

 

 

Sign Out ?

Are you sure you want to sign out?

Press No if you want to continue work. Press Yes to signout user.