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ÍêÈ«¼òÃ÷ÊÖ²á
תÌû
SQLÊÇStructured Quevy Language(½á¹¹»¯²éѯÓïÑÔ)µÄËõд¡£SQLÊÇרΪÊý¾Ý¿â¶ø½¨Á¢
µÄ²Ù×÷ÃüÁ£¬ÊÇÒ»ÖÖ¹¦ÄÜÆëÈ«µÄÊý¾Ý¿âÓïÑÔ¡£ÔÚÊ¹Ó ......
´´½¨Ò»¸öÊý¾Ý¿â£¨¿âÃû£ºÑ§Éú¿â£©²¢ÉèÖÃÁ½¸öÊý¾ÝÎļþºÍÁ½¸öÈÕÖ¾Îļþ
create database ѧÉú¿â
on primary
( name=ѧÉú_data1, filename='e:\ѧÉú_data1.mdf', size=1mb, maxsize=3mb,filegrowth=1mb ),
( name=ѧÉú_data2, filename='e:\ѧÉú_data2.ndf', size=1mb, maxsize=3mb, filegrowth=10% )
log on
( name=ѧÉú_ ......
´´½¨Îļþ¼Ð£ºexec xp_cmdshell 'md ÅÌ·û:\Îļþ¼ÐÃû³Æ', no_output
ÀýÈ磺ÔÚDÅÌ´´½¨ÃûΪ£º“×ÊÁÏ”µÄÎļþ¼Ð£ºexec xp_cmdshell 'md d:\×ÊÁÏ', no_output
²é¿´Îļþ£ºexec xp_cmdshell 'dirÅÌ·û:\Îļþ¼ÐÃû³Æ'¡£ÀýÈ磺exec xp_cmdshell 'dir d:\×ÊÁÏ'
ÅжÏÊý¾Ý¿âÊÇ·ñ´æÔÚ£ºif exists(select * from sysdat ......
--Óï ¾ä¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT¡¡¡¡¡¡--ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE¡¡¡¡¡¡--¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE¡¡¡¡--´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE¡¡¡¡ --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER ......