lang_createvtab.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html><head>
  3. <title>SQLite Query Language: CREATE VIRTUAL TABLE</title>
  4. <style type="text/css">
  5. body {
  6. margin: auto;
  7. font-family: Verdana, sans-serif;
  8. padding: 8px 1%;
  9. }
  10. a { color: #45735f }
  11. a:visited { color: #734559 }
  12. .logo { position:absolute; margin:3px; }
  13. .tagline {
  14. float:right;
  15. text-align:right;
  16. font-style:italic;
  17. width:240px;
  18. margin:12px;
  19. margin-top:58px;
  20. }
  21. .toolbar {
  22. font-variant: small-caps;
  23. text-align: center;
  24. line-height: 1.6em;
  25. margin: 0;
  26. padding:1px 8px;
  27. }
  28. .toolbar a { color: white; text-decoration: none; padding: 6px 12px; }
  29. .toolbar a:visited { color: white; }
  30. .toolbar a:hover { color: #80a796; background: white; }
  31. .content { margin: 5%; }
  32. .content dt { font-weight:bold; }
  33. .content dd { margin-bottom: 25px; margin-left:20%; }
  34. .content ul { padding:0px; padding-left: 15px; margin:0px; }
  35. /* rounded corners */
  36. .se { background: url(images/se.png) 100% 100% no-repeat #80a796}
  37. .sw { background: url(images/sw.png) 0% 100% no-repeat }
  38. .ne { background: url(images/ne.png) 100% 0% no-repeat }
  39. .nw { background: url(images/nw.png) 0% 0% no-repeat }
  40. </style>
  41. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  42. </head>
  43. <body>
  44. <div><!-- container div to satisfy validator -->
  45. <a href="lang.html">
  46. <h2 align="center">SQL As Understood By SQLite</h2></a><h1>CREATE VIRTUAL TABLE</h1><h4><a href="syntaxdiagrams.html#create-virtual-table-stmt">create-virtual-table-stmt:</a></h4><blockquote> <img alt="syntax diagram create-virtual-table-stmt" src="images/syntax/create-virtual-table-stmt.gif"></img> </blockquote>
  47. <p>A virtual table is an interface to an external storage or computation
  48. engine that appears to be a table but does not actually store information
  49. in the database file.</p>
  50. <p>In general, you can do anything with a virtual table that can be done
  51. with an ordinary table, except that you cannot create indices or triggers on a
  52. virtual table. Some virtual table implementations might impose additional
  53. restrictions. For example, many virtual tables are read-only.
  54. Virtual tables cannot be used in
  55. shared cache mode.</p>
  56. <p>The &lt;module-name&gt; is the name of an object that implements
  57. the virtual table. The &lt;module-name&gt; must be registered with
  58. the SQLite database connection using
  59. sqlite3_create_module()
  60. prior to issuing the CREATE VIRTUAL TABLE statement.
  61. The module takes zero or more comma-separated arguments.
  62. The arguments can be just about any text as long as it has balanced
  63. parentheses. The argument syntax is sufficiently general that the
  64. arguments can be made to appear as column definitions in a traditional
  65. <a href="lang_createtable.html">CREATE TABLE</a> statement.
  66. SQLite passes the module arguments directly
  67. to the module without any interpretation. It is the responsibility
  68. of the module implementation to parse and interpret its own arguments.</p>
  69. <p>A virtual table is destroyed using the ordinary
  70. <a href="lang_droptable.html">DROP TABLE</a> statement. There is no
  71. DROP VIRTUAL TABLE statement.</p>