mysql.html

来自「ActiveX Data Objects Programming in C++ 」· HTML 代码 · 共 63 行

HTML
63
字号
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ActiveX Data Objects Tutorial</title>
<link rel="stylesheet" href="tutorial.css">
</head>

<body>

<h1>MySQL Commands</h1>

<p>&nbsp;</p>

<pre>create database pcs;    # Create the database.

use pcs;                # Use the newly created database.

create table item       # Create the item table.
(
    itemid int(10) unsigned auto_increment,
    item varchar(30) not null default '',
    specification varchar(100) not null default '',
    baseprice double not null default '0.00',
    actualprice double not null default '0.00',
    supplierid int(10) unsigned not null default '0',
    primary key(itemid),
    unique key(item, specification, supplierid)
);

create table supplier   # Create the supplier table.
(
    supplierid int(10) unsigned auto_increment,
    name varchar(50) not null default '',
    owner varchar(50) not null default '',
    address varchar(50) not null default '',
    phone1 varchar(15) not null default '',
    phone2 varchar(15),
    phone3 varchar(15),
    phone4 varchar(15),
    email varchar(25),
    primary key(supplierid),
    unique key(name, owner)
);

# Insert first row of supplier table.
insert into supplier values(null, 'Unknown Supplier', '', '', '', null, null, null, null);

# Create a new mysql user.
grant select, insert, update, delete, lock tables on pcs.* to 'pcs' identified by 'cygnus';
flush privileges;

</pre>
<p><a href="ado.html#Sample Code">Back to ADO Tutorial</a></p>

<p>&nbsp;</p>

<p class="cnotice">Copyright 2003-2004 Mark Jundo P. Documento</p>

</body>

</html>

⌨️ 快捷键说明

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