SQL基础2
来源:互联网 发布:俄罗斯共青城现状 知乎 编辑:程序博客网 时间:2024/05/01 16:42
--输出字符串"I love you "对应的ASCII值和字符declare @pos smallint, --位置 @string varchar(10) --字符串set @pos = 1;set @string = 'I love you'--datalength是一个全局数据,返回数据的长度while (@pos <= datalength(@string))begin select ascii(substring(@string, @pos, 1)) as AsciiCode, --获取ASCII码 char(ascii(substring(@string, @pos, 1))) as ascchar--获取对应的字符 set @pos = @pos + 1endcreate database studentInfoon primary( name = stu_data, filename = 'd:\stu_data.mdf', size = 3, maxsize = 15, filegrowth = 1)log on( name = stu_log, filename = 'd:\stu_log.ldf', size = 1, maxsize = 12, filegrowth = 10%)use studentgocreate proc tea_pro(@no char(6), @name nvarchar(8), @sex nchar(1), @age int, @title nchar(5), @tel varchar(12), @salary decimal(7), @num char(10))as insert into teacher_info values(@no, @name, @sex, @age, @title, @tel, @salary, @num)gouse studentgocreate proc stud_proc (@startdate datetime, @enddate datetime, @recordcount int output) --用output指定为返回值as if (@startdate is null or @enddate is null) begin raiserror('Null value are invalid!', 5, 5) return end select * from stud_info where birthday between @startdate and @enddate select @recordcount = @@rowcountgo
- 2-基础SQL语句
- SQL基础2
- SQL基础练习2
- SQL基础2
- SQL基础总结2
- SQL基础日记2
- SQL基础日记2
- SQL基础学习2
- SQL基础2
- SQL基础学习2
- Sql基础语句2
- SQL基础语法2
- SQL--基础语句2
- SQL语言基础(2)
- 0015 sql 基础(2)
- SQL基础入门学习(2)
- 第2章:SQL基础
- SQL基础
- C++ 回调函数的简单例子
- 8大你不得不知的Android调试工具
- [MVC] 关于jquery调用PartialView局部刷新的问题
- struts2.3.4.1+hibernate3.6.5+spring3.1.2配置
- J2EE技术规范(五)——JSP(出错页,Forward,Include,标签)
- SQL基础2
- Java高新技术(二)之类加载机制和反射
- linux学习
- VirtualBox 虚拟机中安装 Ubuntu 12.04
- Android eclipse中程序调试
- Sumsets Uva10125 poj
- Integer笔记
- CF 253A(最大间隔相异队列)
- Windows Server 2003中的磁盘管理