mysql> select * from mytable; +----------+------+------------+-----------+ | name | sex | birth | birthaddr | +----------+------+------------+-----------+ | abccs |f | 1977-07-07 | china | | mary |f | 1978-12-12 | usa | | tom |m | 1970-09-02 | usa | +----------+------+------------+-----------+
mysql> create table title(writer varchar(20) not null, -> title varchar(40) not null, -> senddate date); 向該表中填加記錄,最后表的內(nèi)容如下: <ccid_nobr> <table width="400" border="1" cellspacing="0" cellpadding="2" bordercolorlight = "black" bordercolordark = "#FFFFFF" align="center"> <tr> <td bgcolor="e6e6e6" class="code" style="font-size:9pt"> <pre><ccid_code> mysql> select * from title; +--------+-------+------------+ | writer | title | senddate | +--------+-------+------------+ | abccs | a1 | 2000-01-23 | | mary | b1 | 1998-03-21 | | abccs | a2 | 2000-12-04 | | tom | c1 | 1992-05-16 | | tom | c2 | 1999-12-12 | +--------+-------+------------+ 5 rows in set (0.00sec)
mysql> SELECT name,sex,title FROM mytable,title -> WHERE name=writer AND name=′abccs′; +-------+------+-------+ | name | sex | title | +-------+------+-------+ | abccs | f | a1 | | abccs | f | a2 | +-------+------+-------+
mysql> select title,writer,birthaddr,birth from mytable,title -> where mytable.name=title.writer and title=′a2′; +-------+--------+-----------+------------+ | title | writer | birthaddr | birth | +-------+--------+-----------+------------+ | a2 | abccs | china | 1977-07-07 | +-------+--------+-----------+------------+
上一篇: cn域名注冊(cè)問(wèn)題集錦
下一篇: MySQL的數(shù)據(jù)類(lèi)型和建庫(kù)策略詳解
QQ在線(xiàn)咨詢(xún)服務(wù)時(shí)間:7 * 24小時(shí)
售前咨詢(xún):
大客戶(hù)部:
渠道合作:
售后服務(wù)服務(wù)時(shí)間:7 * 24小時(shí)
售后服務(wù):
海騰公告海騰數(shù)據(jù)最新新聞公告
400-6717-361
Copyright© 2004-2020 河南海騰電子技術(shù)有限公司 版權(quán)所有 經(jīng)營(yíng)性ICP/ISP證 備案號(hào):B1-20180452 豫公網(wǎng)安備 41019702002018號(hào) 電子營(yíng)業(yè)執(zhí)照