I am fairly new at SQL and I'm writing a simple poll style webapp. We have MS-SQL Server 7. Basically I have a table with three columns - ID (int), name (varchar 255), votecount (int). When a user votes for a specific name, I want to increment the votecount column for that name by one. Can I do something like:
UPDATE tablename
SET votecount = votecount + 1 (this is the line I'm unsure of being able to do)
WHERE ID = form.ID
??
And while I'm at it, Any recommendations on a good SQL reference book for beginners?
Thanks tons.
UPDATE tablename
SET votecount = votecount + 1 (this is the line I'm unsure of being able to do)
WHERE ID = form.ID
??
And while I'm at it, Any recommendations on a good SQL reference book for beginners?
Thanks tons.