sql server 2000 中的数据类型
declare @tmp_table table(tempvalue varchar(100) null)
insert into @tmp_table
select optname from dbo.MSreplication_options
select * from @tmp_table
alter table testTable
(
decimal_field decimal null,
datetime_field datetime null,
money_field money null,
numeric_field numeric null,
binary_field binary null,
sql_variant_field sql_variant null
)
alter table testTable
alter column decimal_field decimal(4,2)
insert into testTable(decimal_field) values(99.999)
insert into testTable(datetime_field) values('12/07/1998')
insert into testTable(datetime_field) values('12/07/1998')
insert into testTable(datetime_field) values(12/07/1998)
insert into testTable(datetime_field) values(12/07/1998)
insert into testTable(money_field) values(99999999999999.12345)
insert into testTable(money_field) values($999999.12345)
insert into testTable(money_field) values(cast('$999,999.12345' as money))
insert into testTable(binary_field) values(0xe)
insert into testTable (sql_variant_field) values('0xe')
insert into testTable (sql_variant_field) values(0xe)
insert into testTable (sql_variant_field) values(123)
insert into testTable (sql_variant_field) values(1234567.123)
select * from testTable
delete from testTable
create table 数字数据
(
decimal_number decimal(8,6),
numeric_number numeric(5,3)
)
insert into 数字数据
values(99.99999788,50)
insert into 数字数据
values(99.999999,300)
相关文档:
1 ,对于日期字段字段
access表示为:#1981-28-12#
SQLSERVER2000表示为:''1981-02-12''
2,SQL语句区别,select ,update 在对单表操作时都差不多,
但多表操作时update语句的区别ACCESS与SQLSERVER中的Update语句对比:
SQLSERVER中更新多表的Update语句:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Whe ......
如果你经常遇到下面的问题,你就要考虑使用SQL Server的模板来写规范的SQL语句了:
SQL初学者。
经常忘记常用的DML或是DDL SQL 语句。
在多人开发维护的SQL中,每个人都有自己的SQL习惯,没有一套统一的规范。
在SQL Server Management Studio中,已经给大家提供了很多常用的现成SQL规范模板。
SQL Server Management ......
一般国内的小一点的新闻站点程序 都有 ""&request 这种漏洞,下面我讲解攻击方法
在地址栏:
and 1=1
查看漏洞是否存在,如果存在就正常返回该页,如果没有,则显示错误,继续假设这个站的数据库存在一个admin表
在地址栏:
and 0<>(select count(*) from admin)
返回页正常,假设成立了。
下面来猜猜看 ......
在PL/SQL块中不能直接调用DDL语句,可以利用下面的方法进行调用
方法一:动态SQL
execute immediate 'CREATE TABLE newtable AS
&nb ......