473,419 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Mean Of @ symbol In Parameterized Query?

I want to know the meaning of @ symbol In parameterized query.
apart from this if i write an query like this
Delete * From Client Where Id=@Id
Can u explain the work Of @Id?
its just like a variable in which we store the value & set in id or any diffrent thing.
thank you
or we can write @AnyName inplace of @Id while id is the column name in a database,
May 16 '10 #1
1 14562
Jim Doherty
897 Expert 512MB
@AnagJohari
the @ is merely a set variable stating that the whatever is contained in @ (distinquished by the sequence of characters immediately following it) is to be understood as a parameter variable

stating this:
Expand|Select|Wrap|Line Numbers
  1. Delete * From Client Where Id=Id
will delete all records in your table

whereas
this:
Expand|Select|Wrap|Line Numbers
  1. Delete * From Client Where Id=@Id
will delete only those records that match the value contained in the variable @Id

You do not have to specifically use the term @Id it can be @Anyname or @ThisVariable or @MickeyMouse it really does not matter what you suffix @
May 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: shumaker | last post by:
I have a form in an Access Project that displays some records, and based on the displayed records I'd like to output this to an excel file, but I need to write more fields of the record than are...
8
by: deko | last post by:
I'm trying to open a Recordset based on a parameterized query. I'm kind of new to parameterized queries, so I'm sure I'm missing something simple. Set qdfs = db.QueryDefs Set qdf =...
1
by: Jorell | last post by:
Hey everyone, I am currently using Microsofts DataAccess Application block ( SQLHelper ) and what I want to do is use a parameterized query instead of just SQL. I can not use stored procedures,...
1
by: John Bailo | last post by:
In testing it seems like I can only use a parameterized query when the parameters are in a WHERE clause. For example cmd.CommandText = "SELECT * FROM jbtest where testfield1=@tablename ";...
8
by: Roland Hall | last post by:
In Access you use "*" + + "*", + can be replaced with & Calling a parameterized query in Access requires % be used in place of *, however, all that I have read show dynamic SQL passed to Access: ...
0
by: BenCoo | last post by:
Hello colleagues, I have a ObjectDataSource wich is linked to a SQL Server 2005 database I a gridview I have data and on each row a "Edit button" wich wil show the selected record in editmode....
1
by: TF | last post by:
This group came through for me last time so here we go again. My page shows paint colors, brand name, product code, etc in a gridview with the background matching the paint color. Several links on...
2
by: bob | last post by:
Hi, Its been a long time since I have had the joy of feeding parameterized query CommandText strings to an OleDBCommand object. I have tried all manner of versions of " update foo set bar = @bar...
3
by: xlar54 | last post by:
Is there a way to see the exact SQL being generated from a parameterized query? I am using this technique but am getting some strange SQL errors during execution and I would like to see the final...
2
by: mcalex | last post by:
Hi, I'm having trouble trying to populate a list box with data from a parameterized query. If I set the rowsource property to the query name, when the form opens I get the parameter values dialog,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.