PL\SQL²éѯ³öÏÖÂÒÂë½â¾ö°ì·¨
1. ´ò¿ªpl\sql ÔËÐÐÏÂÃæµÄ½Å±¾£¬²éѯ·þÎñÆ÷µÄ×Ö·û¼¯ ¡£
SELECT 'AMERICAN_AMERICA.' || PROPERTY_VALUE
from DATABASE_PROPERTIES
WHERE PROPERTY_NAME = 'NLS_CHARACTERSET';
ÎÒµÄÊÇ AMERICAN_AMERICA.ZHS16GBK
2.ÔÚÔËÐÐÖÐÊäÈ룺regedit£¬´ò¿ª×¢²á±í±à¼Æ÷£»
3.HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->HOMEO
Ë«»÷£ºNLS_LANG ½«£ºSIMPLIFIED CHINESE_CHINA.ZHS16GBK
¸ÃΪ¸Õ²Å²éѯ³öÀ´µÄ£º AMERICAN_AMERICA.ZHS16GBK
Ïà¹ØÎĵµ£º
Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......
---Ò»¸öÔµĵÚÒ»Ìì
SELECT DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
--- ±¾ÖܵÄÐÇÆÚÒ»
SELECT DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
---Ò»ÄêµÄµÚÒ»Ìì
SELECT DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)
----¼¾¶ÈµÄµÚÒ»Ìì
SELECT DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)
----ÉϸöÔµÄ×îºóÒ»Ìì
......
--´´½¨±íTongXunLu
CREATE TABLE TongXunLu
(
[tName] nvarchar(30),
[tAddress] nvarchar(50),
[tEmail] varchar(50)
)
--´´½¨±í students
CREATE TABLE students
(
[sId] int IDENTITY (1, 1) primary key NOT NULL ,
[sName] varchar (50) NOT ......
ÓйطÖÒ³ SQL µÄ×ÊÁϺܶ࣬ÓеÄʹÓô洢¹ý³Ì£¬ÓеÄʹÓÃÓαꡣ±¾È˲»Ï²»¶Ê¹ÓÃÓα꣬ÎÒ¾õµÃËüºÄ×Ê¡¢Ð§Âʵͣ»Ê¹Óô洢¹ý³ÌÊǸö²»´íµÄÑ¡Ôñ£¬ÒòΪ´æ´¢¹ý³ÌÊǾ¹ýÔ¤±àÒëµÄ£¬Ö´ÐÐЧÂʸߣ¬Ò²¸üÁé»î¡£ÏÈ¿´¿´µ¥Ìõ SQL Óï¾äµÄ·ÖÒ³ SQL °É¡£
·½·¨1£º
ÊÊÓÃÓÚ SQL Server 2000/2005
SELECT TOP Ò³´óС *
from tab ......
Æô¶¯ MS SQL SERVER £¨2000 £2008¶¼ÊÊÓã©£º
cmd>net start mssqlserver
Æô¶¯ ·ÇȱʡʵÀý£º
cmd>net start mssql$[instance name]
×¢£ºÃüÁîÐÐÐèÒªÓÐAdministratorȨÏÞ¡£
Í£Ö¹SQLSERVER ·þÎñÆ÷:
cmd>net stop mssqlserver
cmd>net stop mssql$[instance name] ......