Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQL HexString Óë Binary »¥»»

HexString to Binary:
DECLARE @y CHAR(34)
SET @y = '0x499104dc92dd27499da9ad8f56dcb437'
DECLARE @x BINARY(16)
DECLARE @sql NVARCHAR(200)
SET @sql = 'SELECT @x = ' + @y
EXEC sp_executesql
@sql,
N'@x BINARY(16) OUTPUT',
@x OUTPUT
SELECT @x
Binary to HexString:
DECLARE @a VARBINARY(20)
SET @a=0x7fd81de7360fb53649412521d06249cc69357d78
SELECT @a
SELECT master.dbo.fn_varbintohexstr(@a)


Ïà¹ØÎĵµ£º

cobolдsqlÃüÁî

SQLÖÐWHERE×Ó¾äÖпÉÒÔÀûÓÃLIKEÀ´Æ¥ÅäÏàËƵÄÊý¾ÝÏµ±Ê±Îҵõ½µÄ½áÂÛÊÇ¿ÉÒÔʹÓÃ"%"À´Æ¥Åä×Ö·û´®£¬ÔÚSPUFIÖÐʹÓ㬵ÄÈ·¿ÉÒԵõ½×Ö·û´®Æ¥ÅäµÄЧ¹û¡£È磺
    SELECT * from TEST
          WHERE TESTID LIKE "CZX%";
    ÉÏÃæÕâ¾äÔÚSPUFIÖÐÌ ......

SQL Server Óï¾ä

Êý¾Ý¿â£º
1¡¢  ´´½¨Êý¾Ý¿âµÄÓï·¨£º
if exists (select * from sysdatabases where name='DT_name')   /*ÅжÏÊÇ·ñ´æÔÚ£¬ÊÇÔòɾ³ý*/
drop database DT_name
create database database_name
on          primary  /* Ö¸¶¨Ö÷ÒªÎļþ×飬ÆäÖеÚÒ»¸öÖ÷ÒªÎļþ * ......

AccessÓëSql ServerÖ®ASP´úÂë±È½Ï

ºǫ́Êý¾Ý¿â£º
[Microsoft Access]
Óë
[Microsoft Sql Server]
¸ü»»Ö®ºó£¬ASP´úÂëӦעÒâÒªÐ޸ĵÄһЩµØ·½£º
[Ò»]Á¬½ÓÎÊÌ⣨¾ÙÀý)
[Microsoft Access]
constr = "DBQ=c:\data\clwz.mdb; DRIVER={Microsoft Access Driver (*.mdb)}"
[Microsoft Sql Server]
constr = "DRIVER={SQL Server};SERVER=host;DATA ......

SQLÖÐ groupbyºÍhavingµÄÇø±ð

½éÉÜGROUP BY ºÍ HAVING ×Ó¾äÇ°£¬ÎÒÃDZØÐèÏȽ²½²sqlÓïÑÔÖÐÒ»ÖÖÌØÊâµÄº¯Êý:¾ÛºÏº¯Êý£¬ÀýÈçSUM, COUNT, MAX, AVGµÈ¡£ÕâЩº¯ÊýºÍÆäËüº¯ÊýµÄ¸ù±¾Çø±ð¾ÍÊÇËüÃÇÒ»°ã×÷ÓÃÔÚ¶àÌõ¼Ç¼ÉÏ¡£
 SELECT SUM(population) from bbc
ÕâÀïµÄSUM×÷ÓÃÔÚËùÓзµ»Ø¼Ç¼µÄpopulation×Ö¶ÎÉÏ£¬½á¹û¾ÍÊǸòéѯֻ·µ»ØÒ»¸ö½á¹û£¬¼´ËùÓйú¼ÒµÄ×ÜÈË¿ ......

Sqlʱ¼ä¸ñʽ»¯·½·¨(ת)


Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select
CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100),
GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3):
16/05/06
Select CONVERT(varchar(100), GETDATE(), 4): 16.05.06
Select
CON ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ