Need help with SQL Queerrrrrrry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juicy D. Links
    So Fucking Banned
    • Apr 2001
    • 122992

    #1

    Need help with SQL Queerrrrrrry

    INSERT INTO table_states (state, code, country_code) VALUES ('Aberdeenshire','ABd','GB');


    Ok if i want to drop this country would i make it look like this?

    DROP table_states (state, code, country_code) VALUES ('Aberdeenshire','ABd','GB');
  • juicylinks
    So Fucking Banned
    • Apr 2001
    • 122992

    #2
    i aint gonna make fun of Sobe or Lil2rich till i get help fuckers

    Comment

    • organic
      Registered User
      • May 2003
      • 16

      #3
      delete from table_states where state = 'Aberdeenshire'

      Drop is for deleting a table not an entry.

      Comment

      • online
        Registered User
        • Mar 2003
        • 22

        #4
        You may have problems deleting other rows if state is not key

        Comment

        • KC
          Confirmed User
          • Jan 1995
          • 2417

          #5
          Originally posted by organic
          delete from table_states where state = 'Aberdeenshire'

          Drop is for deleting a table not an entry.
          One other note...

          Delete from [tablename];

          without a where clause, will empty your entire table. Make sure you're really careful when deleting records.
          Last edited by KC; 08-18-2003, 04:14 PM.

          Jupiter Hosting, Inc.
          Vice President, Business Development
          kc (AT) jupiterhosting.com

          Comment

          • juicylinks
            So Fucking Banned
            • Apr 2001
            • 122992

            #6
            Originally posted by KC


            One other note...

            Delete from [tablename];

            without a where clause, will empty your entire table. Make sure you're really careful when deleting records.
            Thanks KC and others. Yeah i backed it up then fucked around with it till i got it.

            SQl queries make me hard for some reason

            Comment

            • gornyhuy
              Chafed.
              • May 2002
              • 18041

              #7
              Do yourself a favor and install PHPMYADMIN...

              icq:159548293

              Comment

              • BlueDesignStudios
                Confirmed User
                • Feb 2003
                • 9492

                #8
                Try this unix command as well while you're at it:

                rm -r

                Preferably while you're in the root dir


                Blue Design Studios - Adult Design Specialists!
                Email me for a free quote: [email protected]

                Comment

                • juicylinks
                  So Fucking Banned
                  • Apr 2001
                  • 122992

                  #9
                  Originally posted by gornyhuy
                  Do yourself a favor and install PHPMYADMIN...
                  where do you think i was running the query from ?

                  Comment

                  • Samoan
                    Confirmed User
                    • Aug 2003
                    • 203

                    #10
                    PHP myAdmin is a great tool. I highly recommend it if you work with a database a lot.
                    Samoan

                    Comment

                    Working...