200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > oracle阴历转阳历换算 用sql语句实现阳历与农历转换

oracle阴历转阳历换算 用sql语句实现阳历与农历转换

时间:2022-06-15 15:03:01

相关推荐

oracle阴历转阳历换算 用sql语句实现阳历与农历转换

用sql语句实现阳历与农历转换

1.建一张表存放数据在下面SQL函数中有用到

create table solardata

(

yearid int not null,

data char(7) not null,

dataint int not null

)

--插入数据

insert into

solardata select 1900,'0x04bd8',19416 union all select 1901,'0x04ae0',19168

union all select 1902,'0x0a570',42352 union all select 1903,'0x054d5',21717

union all select 1904,'0x0d260',53856 union all select 1905,'0x0d950',55632

union all select 1906,'0x16554',91476 union all select 1907,'0x056a0',22176

union all select 1908,'0x09ad0',39632 union all select 1909,'0x055d2',21970

union all select 1910,'0x04ae0',19168 union all select 1911,'0x0a5b6',42422

union all select 1912,'0x0a4d0',42192 union all select 1913,'0x0d250',53840

union all select 1914,'0x1d255',119381 union all select 1915,'0x0b540',46400

union all select 1916,'0x0d6a0',54944 union all select 1917,'0x0ada2',44450

union all select 1918,'0x095b0',38320 union all select 1919,'0x14977',84343

union all select 1920,'0x04970',18800 union all select 1921,'0x0a4b0',42160

union all select 1922,'0x0b4b5',46261 union all s

相关文档:

操作步骤如下,供参考。

数据库转型工作涉及的工作事项分析:表,表数据,索引,外键约束,字段默认值。

存储过程、函数、触发器、视图等由于语法存在差异,只能自行改写处理。

(一)在MS SQL SERVER服务器端的准备工作。

1).创建关于表、视图、主键、索引、字段字典、默认值约束的对象视图。以方便下一步 ......

sql server 还原一个数据到具体的时间

数据库的附加:

sp_attach_db mark ,'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\mark.mdf'

数据库的分离:

sp_deattach_db mark ,'C:\Program Files\Microsoft SQL

Server\MSSQL.1\MSSQL\Data\mark.mdf'

数据库的完全备份:

backup database mark to disk ......

SQL数据库常用命令-创建,删除表-添加,修改,删除字段

/cncco/archive//08/08/4424555.aspx

'创建表

CREATE TABLE dbo.CategoriesNew

(CategoryID intIDETITY (1,1) NOT NULL,

CategoryName nvarchar(15) NOT NULL,

Description ntext NULL,

Picture image NULL)

'删除表

DROP TABL ......

防SQL注入函数

程序代码:

函数部分========================================================================

'------------------------------------------------

'用途:检查是否为数字,以及数字是否超出范围

'输入:检查字符,传值方式(0直接传,1取Form,2取QueryString,3取cookies,4直接Reqeust),开始数字(默认数� ......

实验内容:

掌握SQL Server 2000的预编译程序NSQLPREP.EXE的使用(以课本例题1进行调试);

实验步骤:

一、数据库环境配置

1、创建xuesheng数据库,建立student表等;

2、关闭sql server 2000服务管理器;

3、将devtools文件夹拷贝到:C:\Program Files\Microsoft SQL Server

4、将Binn文件夹拷贝到:C:\Program ......

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。