⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tables.sql

📁 C++连接一写常用数据库的接口
💻 SQL
字号:
# dbConnect mSQL database example(s) and testing tables# Copyright (C) 2003 Johnathan Ingram, jingram@rogueware.org## This library is free software; you can redistribute it and/or#   modify it under the terms of the GNU Lesser General Public#   License as published by the Free Software Foundation; either#   version 2.1 of the License, or (at your option) any later version.##   This library is distributed in the hope that it will be useful,#   but WITHOUT ANY WARRANTY; without even the implied warranty of#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU#   Lesser General Public License for more details.##   You should have received a copy of the GNU Lesser General Public#   License along with this library; if not, write to the Free Software#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  US##   Note: To create execute `cat tables.sql | msql -h localhost dbconnectDB`#DROP INDEX tyt1 FROM TypeTest\gDROP TABLE TypeTest\gCREATE TABLE TypeTest(   id                      INT NOT NULL,  description             CHAR(100) NOT NULL,    t_INT                   INT,  t_UINT                  UINT,  t_INT8                  INT8,  t_UINT8                 UINT8,  t_INT16                 INT16,  t_UINT16                UINT16,  t_INT32                 INT32,  t_UINT32                UINT32,  t_INT64                 INT64,  t_UINT64                UINT64,  t_REAL                  REAL,  t_MONEY                 MONEY,  t_DATE                  DATE,  t_TIME                  TIME,  t_CHAR                  CHAR(100),  t_IPV4                  IPV4,  t_TEXT                  TEXT(1024))\gCREATE UNIQUE INDEX tyt1 ON TypeTest(id)\gINSERT INTO TypeTest    (id, description, t_INT, t_UINT, t_INT8, t_UINT8, t_INT16, t_UINT16, t_INT32, t_UINT32, t_INT64, t_UINT64)VALUES   (1, '1: Integer Types', -32767, 65535, -127, 255, -32767, 65535, -2147483647, 4294967295, -9223372036854775807, 18446744073709551615)\gINSERT INTO TypeTest    (id, description, t_REAL, t_MONEY)VALUES   (2, '2: Float & Money Types', -1.7976931348623157E+308, 80359.56)\gINSERT INTO TypeTest    (id, description, t_DATE, t_TIME)VALUES   (3, '3: Date & Time Types', '21-Jan-2003', '15:34:59')\gINSERT INTO TypeTest    (id, description, t_CHAR, t_IPV4)VALUES   (4, '4: String and IP Types', 'This is a char', '192.168.8.1')\gINSERT INTO TypeTest    (id, description, t_TEXT)VALUES(5, '5: Text / Binary Types', 'This is a text type thingy. Test \\<-- Is a backslash')\g

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -