sql ½ØÈ¡×Ö·û´®
±íµÄÒ»ÁÐÊÇ wbm ÓÐÖµ '1001001000' '1001002000' '1001003000' ÔõôµÃµ½ ÏÂÒ»¸ö 1001003000?
select max(wbm)....
ʲôÒâ˼?
˵´íÁË Êǵõ½1001004000
SQL code:
create table T2(wbm bigint identity(1001001000,1000),Content varchar(20))
insert T2 (Content)
select 'a' union all
select 'b' union all
select 'c' union all
select 'd'
select * from T2
wbm Content
-------------------- --------------------
1001001000 a
1001002000 b
1001003000 c
1001004000 d
(4 ÐÐÊÜÓ°Ïì)
²Î¿¼£ºSQL code:
create table tb
(id int identity,
name varchar(10),
code as 'BH'+right('0000'+cast(id as varchar),5))
go
insert tb(name) select 'A'
union all select 'B'
union all select 'C'
union all select 'D'
select * from tb
drop table tb
/*
id name code
----------- ---------- ------------
1 A BH00001
2 B BH00002
3 C BH00003
4 D BH00004
£¨ËùÓ°ÏìµÄÐÐÊýΪ 4 ÐУ©
SQL code:
--ÏÂÃæµÄ´úÂ
Ïà¹ØÎÊ´ð£º
sql 2005Êý¾Ý¿âÎÒÏëµÃµ½Ò»×Ö·û´®Îª:
sldkf|||sdeww
erkv|||rltdk
jemcl|||ligf
¾ÍÊÇ|||ºóÃæµÄ×Ö·ûÓÐʲôº¯ÊýÄܵõ½Âð£¿ÊÇÔÚsqlÓï¾äдµÄ£¬²»ÊÇÔÚÒ³ÃæÐ´µÄ£¬ÄÇλ¸ßÊÖÀ´Ö¸½ÌÏ£¬ÐÂÊÖ£¬Ð»Ð»
ÔÎ µ ......
³¡¾°ÈçÏ£º
¿Í»§°Ñ±¸·ÝºÃµÄÊý¾Ý¿â£¬·¢¸øÎÒ£¬ÎÒÔÚ±¾»ú»¹Ôºó£¬ÔËÐÐдºÃµÄ´æ´¢¹ý³Ì£¬±È½Ï¿ì£¬²¢ÇÒÔÚʵʩÄDZßÔËÐÐͬÑù±È½Ï¿ì¡£µ«Êǵ±ÊµÊ©ÔÚ¿Í»§ÄDZßÔËÐеÄʱºòËٶȾͷdz£µÄÂý£¬Ê±¼ä³¬³öÁ˳ÌÐòµÄʱ¼äÏÞÖÆ¡£Ô¶³ÌÔÚ¿Í»§ÄÇ ......
CREATE PROCEDURE [selectvipcompany]
@username varchar(50),
@companyname varchar(50),
@endtime varchar(1)
AS
declare @sql varchar(1000)
set @sql=''
if (@username<>null and @username ......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......