zoukankan
html css js c++ java
sql的嵌套
declare
@CourseNum
int
declare
@ChapterNum
int
set
@ChapterNum
=
1
set
@CourseNum
=
1
while
(
@courseNum
<=
10
)
begin
declare
@courseName
varchar
(
30
)
set
@CourseName
=
'
Course
'
+
Convert
(
Varchar
(
30
),
@courseNum
)
insert
into
course
values
(
@CourseName
)
while
(
@ChapterNum
<=
20
)
begin
declare
@ChapterName
varchar
(
40
)
set
@ChapterName
=
@courseName
+
'
_Chapter
'
+
Convert
(
Varchar
(
30
),
@ChapterNum
)
insert
into
chapter
values
(
@ChapterName
,
@CourseNum
)
set
@ChapterNum
=
@ChapterNum
+
1
continue
end
set
@ChapterNum
=
1
--
-一定要重置一下 否则它再第一次循环后一直保持为20
set
@courseNum
=
@courseNum
+
1
continue
end
select
*
from
chapter
查看全文
相关阅读:
Windows Terminal 配色方案说明
Windows Terminal 美化简记
家庭组网启用 NAS
Eclipse使用Git检出项目
SVN clean失败解决方法
httpClient closeableHttpClient
JSON字符串与Map互转
httpclient用getStatusCode
同一台电脑同时装jdk1.8和jdk1.7
PL/SQL连接远程oracle数据库配置
原文地址:https://www.cnblogs.com/phiree/p/389111.html
最新文章
【译】x86程序员手册20-6.3.4门描述符守卫程序入口
【译】x86程序员手册19-6.3.2数据访问的约束
【译】x86程序员手册18-6.3.1描述符保存保护参数
【译】x86程序员手册17-第6章保护
【译】x86程序员手册16-5.3联合使用段与分页转换
【译】x86程序员手册15-5.2页转换
【译】x86程序员手册14-5.1段转换
【译】x86程序员手册13-第5章 内存管理
【译】x86程序员手册12-4.2系统指令
CSS样式(选择器+浮动效果)
热门文章
HTML三栏式布局及CSS样式注释
Form表单介绍及其使用细则
用HTML+CSS编写课程表及个人简历表
Nginx 反向代理 owncloud 问题处理
配置 Pi Dashboard 容器监测树莓派
Nginx 容器反向代理和 SSL 配置
owncloud 容器复杂配置
运行配置 Nginx 容器
树莓派使用VNC远程连接
PowerShell SSH 连接超时自动断开解决
Copyright © 2011-2022 走看看