Jump to content
  • 0

SQL function support...


Peopleperson49

Question


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

How do I make a SQL function that will delete a column from a certain set of rows, in a table. Thanks.

 

Peopleperson49

 

Edit: To clarify I want to delete the information in the column and leave a value of 0. Not actually delete the column. For example: any account with a char_id  between 150200 and up has all zeny set to 0.

Edited by Peopleperson49
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

UPDATE `char` SET `zeny` = 0 WHERE `char_id` >= 150200;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Thanks I know it was possible, but my google powers were coming up short. Thanks again!

 

Peopleperson49

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...