ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to Rename a Column in SQLite Database

    IT Discussion
    sqlite sqlite3 sql database
    5
    10
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Believe it or not, until September of 2018, renaming a column in SQLite was not an option! Sounds crazy, but there is some underlying data store reasons why this was a challenge. But they did add this feature, but older guides will tell you otherwise. Now it is easy to do with the following style command...

      ALTER TABLE mytable RENAME COLUMN old_column_name TO new_column_name;
      
      jmooreJ 1 Reply Last reply Reply Quote 1
      • jmooreJ
        jmoore @scottalanmiller
        last edited by

        @scottalanmiller Why do people use SQLite again??

        J stacksofplatesS scottalanmillerS 3 Replies Last reply Reply Quote 0
        • J
          JasGot @jmoore
          last edited by

          @jmoore said in How to Rename a Column in SQLite Database:

          @scottalanmiller Why do people use SQLite again??

          Sometimes it is bundled and installed with the user facing product.

          jmooreJ 1 Reply Last reply Reply Quote 0
          • jmooreJ
            jmoore @JasGot
            last edited by

            @JasGot said in How to Rename a Column in SQLite Database:

            @jmoore said in How to Rename a Column in SQLite Database:

            @scottalanmiller Why do people use SQLite again??

            Sometimes it is bundled and installed with the user facing product.

            Lol I get that. I was being pretty facetious:)

            J 1 Reply Last reply Reply Quote 0
            • J
              JasGot @jmoore
              last edited by

              @jmoore said in How to Rename a Column in SQLite Database:

              Lol I get that. I was being pretty facetious:)

              That's funny. I just did what bothers me when other people do it! Sorry, I should have actually thought about what I was typing and better considered who I was typing to.

              I'll just chalk it up to helping others who may come along and actually wonder how it could become installed! 🙂

              1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates @jmoore
                last edited by

                @jmoore said in How to Rename a Column in SQLite Database:

                @scottalanmiller Why do people use SQLite again??

                I mean it's good for testing and for light usage. I've done a couple projects with it because it was easy.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @jmoore
                  last edited by

                  @jmoore said in How to Rename a Column in SQLite Database:

                  @scottalanmiller Why do people use SQLite again??

                  Screaming fast, extremely stable, super light weight. In small deployments, it's actually pretty hard to beat. It's actually amazing that it isn't used far more often.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @stacksofplates
                    last edited by

                    @stacksofplates said in How to Rename a Column in SQLite Database:

                    @jmoore said in How to Rename a Column in SQLite Database:

                    @scottalanmiller Why do people use SQLite again??

                    I mean it's good for testing and for light usage. I've done a couple projects with it because it was easy.

                    Yeah, easy to dev, easy to deploy, really easy for the IT guy on site to deal with. No service to run, nothing complex to deal with, no ports to manage.

                    Pretty limited in its scope, but for a lot of things, it does the job.

                    1 Reply Last reply Reply Quote 0
                    • 1
                      1337
                      last edited by

                      There used to be a lot of databases like SQLite. Often called database engines. dBase was probably one of the first.
                      Later Microsoft Jet engine (aka Microsoft Access) became popular when Visual Basic ruled the world.

                      Basically it's a one user database. You can have more than one user but it's done by multiple users accessing the same database file.

                      user -> application -> sqlite -> database file
                      

                      This in contrast to client-server databases such as mysql, sql server, oracle, etc. Multiple users would be accomplished by multiple clients connecting to the same server.

                      user -> application -> mysql client -> mysql server -> many db files
                      
                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @1337
                        last edited by

                        @Pete-S said in How to Rename a Column in SQLite Database:

                        There used to be a lot of databases like SQLite. Often called database engines. dBase was probably one of the first.
                        Later Microsoft Jet engine (aka Microsoft Access) became popular when Visual Basic ruled the world.
                        Basically it's a one user database. You can have more than one user but it's done by multiple users accessing the same database file.

                        Or by having an application on top that accessing the file and shares it out. That thing can be called a "database management system" or any application, really.

                        All databases use database engines. MySQL, for example, isn't a database. It's a database management system. It uses one or more database engines to talk to the files on disk. MyISAM and InnoDB are two database engine options for the MySQL platform.

                        At the end of the day, all databases work like SQlite. You can easily build your own database management system that uses SQlite as the engine and it could work just like MySQL or Oracle or SQL Server. Those are all single users to a file, under the hood. They just have the "multi-access" management built into an extra layer, instead of letting an application handle it.

                        But for most things, you only access a database from a single app anyway, so that extra layer is often unnecessary as it is redundant. Just adds overhead.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post