GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need SQL command help... (https://gfy.com/showthread.php?t=569317)

uno 01-28-2006 05:35 PM

Need SQL command help...
 
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?

kernelpanic 01-28-2006 05:36 PM

UPDATE `tablename` SET `columnname`='1';

swedguy 01-28-2006 05:49 PM

UPDATE tablename SET columnname=1 WHERE columnname=0

incase you have other numbers than 0 and 1 in that column

kernelpanic 01-28-2006 05:50 PM

He said that all the variables were 0, though :thumbsup

Sly 01-28-2006 05:52 PM

DELETE tablename

uno 01-28-2006 07:40 PM

hmm i don't want to change the column name, just the values in the column

uno 01-28-2006 07:45 PM

Maybe

Update columnname where value = 0 set value =1?

again i have non clue about the syntax

Linguist 01-28-2006 07:55 PM

Here you go:

update tablename set columnname=1 where columname=0

uno 01-28-2006 08:31 PM

I totally heart you.


All times are GMT -7. The time now is 02:41 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123