deleting fields in mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kokong
    New Member
    • Jan 2008
    • 4

    deleting fields in mysql

    What is the query to delete some fields in mysql?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    To delete some value in a field try to set the value to null.

    To remove the field itself from the table try to ALTER the table.

    Comment

    • werks
      New Member
      • Dec 2007
      • 218

      #3
      Originally posted by kokong
      What is the query to delete some fields in mysql?
      Try this

      DELETE * FROM tblBooks

      Hope it helps

      Better Than Yesterday

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by werks
        Try this

        DELETE * FROM tblBooks

        Hope it helps

        Better Than Yesterday
        Sorry werks but that won't work. The * is not allowed.
        To delete all the rows in a table just use [CODE=mysql]delete from tableName[/CODE]

        Comment

        Working...