當前位置:首頁 » 操作系統 » 資料庫求碼

資料庫求碼

發布時間: 2023-10-12 22:40:05

sql資料庫圖書館管理系統求代碼!急用!

use
資料庫名稱(db)
go
--讀者表
create
table
zhe
(
id
int
identity(1,1),
numid
varchar(20)
primary
key,
--主鍵
dname
varchar(20),
post
varchar(20),
dept
varchar(20)
)
--圖書表
create
table
books
(
id
int
identity(1,1)
primary
key,
bnum
varchar(20)
foreign
key
references
zhe(numid),
--外鍵
bname
varchar(20),
bauthor
varchar(20),
bpress
varchar(50),
bprice
decimal,
btype
varchar(10)
)
--借閱記錄
create
table
lendrecord
(
id
int
identity(1,1),
lbnum
varchar(20)
foreign
key
references
zhe(numid),
--外鍵
ldate
datetime,
yhdate
datetime,
redate
datetime
)

Ⅱ VB6.0編程,想把ACCESS07資料庫【ABC】中表1中的所有內容都復制到同一資料庫的表2裡面,求代碼。

在工程里引用microsoft activex data objects 2.7 library

Dim cn As New ADODB.Connection, rs1 As New ADODB.Recordset, sql As String '在通用聲明裡定義,其中cn是連接對象,rs1是記錄集,sql是查詢語句
Private Sub Form_Load()
cn.Open "provider=microsoft.jet.oledb.4.0;data source=" + App.Path + "\資料庫名.mdb" + ""
sql = "select * from 表名"
rs1.Open sql, cn
rs1.MoveFirst
Do While Not rs1.EOF
Combo1.AddItem rs1("欄位名")
rs1.MoveNext
Loop
rs1.Close
End Sub
如果你還有什麼不懂的,可以網路搜下:編程回憶錄,他們現在正在錄制這方面的教程,都是零基礎開始,由淺入深。

Ⅲ 資料庫,求代碼

1、 select student.sno,student.sname
from student,sc,course
where student.sno = sc.sno and
sc.cno = course.cno and
course.cname <> '信息系統'

2、 select c1.cno,c1.cname
from course c1,course c2
where c1.cno = c2.cpno and
c1.ccredit = c2.ccredit

3、 select student.sno,student.sname
from student
where not exists
(
select 1
from sc
where grade < 80 and
sc.sno = student.sno
)

4、 select c1.sno,c1.sname
from
(
select student.sno,student.sname
from student,sc,course
where student.sno = sc.sno and
sc.cno = course.cno and
course.cname = '資料庫'
)c1,
(
select student.sno,student.sname
from student,sc,course
where student.sno = sc.sno and
sc.cno = course.cno and
course.cname <> '操作系統'
)c2
where c1.sno = c2.sno

5、 select c1.avg,c1.sno,c1.sname
from
(
select avg(sc.grade) avg,student.sno,student.sname
from student,sc,course
where student.sno = sc.sno and
sc.cno = course.cno
group by student.sno,student.sname
)c1
(
select avg(sc.grade) avg
from student,sc,course
where student.sno = sc.sno and
sc.cno = course.cno and
student.sname = '劉晨'
)c2
where c1.avg > c2.avg

熱點內容
4k視頻存儲卡 發布:2025-01-23 09:22:13 瀏覽:842
怎麼看筆記本配置好壞怎麼對比 發布:2025-01-23 08:50:00 瀏覽:514
安卓q用起來怎麼樣 發布:2025-01-23 08:49:14 瀏覽:294
foreach資料庫 發布:2025-01-23 08:49:05 瀏覽:741
什麼是車棚配置 發布:2025-01-23 08:42:58 瀏覽:312
智能電視盒子無線網密碼在哪裡 發布:2025-01-23 08:42:14 瀏覽:277
代理提取源碼 發布:2025-01-23 08:41:35 瀏覽:62
nas網路伺服器為什麼貴 發布:2025-01-23 08:00:00 瀏覽:941
語音伺服器未連接如何連接視頻 發布:2025-01-23 07:59:11 瀏覽:883
日流量10萬需要什麼類型伺服器 發布:2025-01-23 07:58:27 瀏覽:501