Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
Need SQL command help...
Need SQL command help...
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
uno
RIP Dodger. BEST.CAT.EVER
Join Date:
Dec 2002
Posts:
18450
Share
Post
#1
Need SQL command help...
01-28-2006, 03:35 PM
I need to change 30,000 variables all from 0 to 1 in a column in a table in sql...
Can anyone give me the command line?
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost
- For all your hosting needs, present and future. Tell them I sent ya!
kernelpanic
Too lazy to set a custom title
Join Date:
Jan 2005
Posts:
2961
Share
Post
#2
01-28-2006, 03:36 PM
UPDATE `tablename` SET `columnname`='1';
ZangoCash - Turn Your Traffic Into Ca$h.
$.40 Per Install - No Tier
Comment
Post
Cancel
swedguy
Confirmed User
Join Date:
Jan 2002
Posts:
7981
Share
Post
#3
01-28-2006, 03:49 PM
UPDATE tablename SET columnname=1 WHERE columnname=0
incase you have other numbers than 0 and 1 in that column
Comment
Post
Cancel
kernelpanic
Too lazy to set a custom title
Join Date:
Jan 2005
Posts:
2961
Share
Post
#4
01-28-2006, 03:50 PM
He said that all the variables were 0, though
ZangoCash - Turn Your Traffic Into Ca$h.
$.40 Per Install - No Tier
Comment
Post
Cancel
Sly
Let's do some business!
Join Date:
Sep 2004
Posts:
31376
Share
Post
#5
01-28-2006, 03:52 PM
DELETE tablename
Vacares
- Web Hosting, Domains, O365, Security & More -
Paxum and BTC Accepted
Windows VPS now available
Great for TSS, Nifty Stats, remote work, virtual assistants, etc.
Click here for more details.
Comment
Post
Cancel
uno
RIP Dodger. BEST.CAT.EVER
Join Date:
Dec 2002
Posts:
18450
Share
Post
#6
01-28-2006, 05:40 PM
hmm i don't want to change the column name, just the values in the column
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost
- For all your hosting needs, present and future. Tell them I sent ya!
Comment
Post
Cancel
uno
RIP Dodger. BEST.CAT.EVER
Join Date:
Dec 2002
Posts:
18450
Share
Post
#7
01-28-2006, 05:45 PM
Maybe
Update columnname where value = 0 set value =1?
again i have non clue about the syntax
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost
- For all your hosting needs, present and future. Tell them I sent ya!
Comment
Post
Cancel
Linguist
Confirmed User
Join Date:
Apr 2004
Posts:
1706
Share
Post
#8
01-28-2006, 05:55 PM
Here you go:
update tablename set columnname=1 where columname=0
315-310
Comment
Post
Cancel
uno
RIP Dodger. BEST.CAT.EVER
Join Date:
Dec 2002
Posts:
18450
Share
Post
#9
01-28-2006, 06:31 PM
I totally heart you.
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost
- For all your hosting needs, present and future. Tell them I sent ya!
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment