<small id='RHPuD'></small><noframes id='RHPuD'>

<legend id='RHPuD'><style id='RHPuD'><dir id='RHPuD'><q id='RHPuD'></q></dir></style></legend>
    • <bdo id='RHPuD'></bdo><ul id='RHPuD'></ul>

      <tfoot id='RHPuD'></tfoot>

        <i id='RHPuD'><tr id='RHPuD'><dt id='RHPuD'><q id='RHPuD'><span id='RHPuD'><b id='RHPuD'><form id='RHPuD'><ins id='RHPuD'></ins><ul id='RHPuD'></ul><sub id='RHPuD'></sub></form><legend id='RHPuD'></legend><bdo id='RHPuD'><pre id='RHPuD'><center id='RHPuD'></center></pre></bdo></b><th id='RHPuD'></th></span></q></dt></tr></i><div id='RHPuD'><tfoot id='RHPuD'></tfoot><dl id='RHPuD'><fieldset id='RHPuD'></fieldset></dl></div>

        仅当表不存在时才在 SQLite 中创建表

        Create table in SQLite only if it doesn#39;t exist already(仅当表不存在时才在 SQLite 中创建表)
        <legend id='Z2d86'><style id='Z2d86'><dir id='Z2d86'><q id='Z2d86'></q></dir></style></legend>

          <small id='Z2d86'></small><noframes id='Z2d86'>

        1. <tfoot id='Z2d86'></tfoot>

                <tbody id='Z2d86'></tbody>
              • <bdo id='Z2d86'></bdo><ul id='Z2d86'></ul>
                <i id='Z2d86'><tr id='Z2d86'><dt id='Z2d86'><q id='Z2d86'><span id='Z2d86'><b id='Z2d86'><form id='Z2d86'><ins id='Z2d86'></ins><ul id='Z2d86'></ul><sub id='Z2d86'></sub></form><legend id='Z2d86'></legend><bdo id='Z2d86'><pre id='Z2d86'><center id='Z2d86'></center></pre></bdo></b><th id='Z2d86'></th></span></q></dt></tr></i><div id='Z2d86'><tfoot id='Z2d86'></tfoot><dl id='Z2d86'><fieldset id='Z2d86'></fieldset></dl></div>
                  本文介绍了仅当表不存在时才在 SQLite 中创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我只想在 SQLite 数据库中创建一个不存在的表.有没有办法做到这一点?如果表存在,我不想删除它,只有在它不存在时才创建它.

                  I want to create a table in a SQLite database only if doesn't exist already. Is there any way to do this? I don't want to drop the table if it exists, only create it if it doesn't.

                  推荐答案

                  来自 http://www.sqlite.org/lang_createtable.html:

                  CREATE TABLE IF NOT EXISTS some_table (id INTEGER PRIMARY KEY AUTOINCREMENT, ...);
                  

                  这篇关于仅当表不存在时才在 SQLite 中创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  SQLite loop statements?(SQLite 循环语句?)
                  Can I use parameters for the table name in sqlite3?(我可以在 sqlite3 中使用表名的参数吗?)
                  SQL - Inserting a row and returning primary key(SQL - 插入一行并返回主键)
                  How to get the number of rows of the selected result from sqlite3?(如何从sqlite3中获取所选结果的行数?)
                  Python : How to insert a dictionary to a sqlite database?(Python:如何将字典插入到 sqlite 数据库中?)
                  What are the advantages of VistaDB(VistaDB有什么优势)
                  <tfoot id='jBi6R'></tfoot>
                    <i id='jBi6R'><tr id='jBi6R'><dt id='jBi6R'><q id='jBi6R'><span id='jBi6R'><b id='jBi6R'><form id='jBi6R'><ins id='jBi6R'></ins><ul id='jBi6R'></ul><sub id='jBi6R'></sub></form><legend id='jBi6R'></legend><bdo id='jBi6R'><pre id='jBi6R'><center id='jBi6R'></center></pre></bdo></b><th id='jBi6R'></th></span></q></dt></tr></i><div id='jBi6R'><tfoot id='jBi6R'></tfoot><dl id='jBi6R'><fieldset id='jBi6R'></fieldset></dl></div>
                      <tbody id='jBi6R'></tbody>
                      <bdo id='jBi6R'></bdo><ul id='jBi6R'></ul>

                          • <small id='jBi6R'></small><noframes id='jBi6R'>

                            <legend id='jBi6R'><style id='jBi6R'><dir id='jBi6R'><q id='jBi6R'></q></dir></style></legend>