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

SQL ALTER TABLE Óï¾ä

³ö´¦£ºhttp://www.w3school.com.cn/sql/sql_alter.asp ALTER TABLE Óï¾ä ALTER TABLE Óï¾äÓÃÓÚÔÚÒÑÓеıíÖÐÌí¼Ó¡¢Ð޸Ļòɾ³ýÁС£ SQL ALTER TABLE Óï·¨ ÈçÐèÔÚ±íÖÐÌí¼ÓÁУ¬ÇëʹÓÃÏÂÁÐÓï·¨: ALTER TABLE table_name
ADD column_name datatype
Ҫɾ³ý±íÖеÄÁУ¬ÇëʹÓÃÏÂÁÐÓï·¨£º
ALTER TABLE table_name
DROP COLUMN column_name
×¢ÊÍ£ºÄ³Ð©Êý¾Ý¿âϵͳ²»ÔÊÐíÕâÖÖÔÚÊý¾Ý¿â±íÖÐɾ³ýÁеķ½Ê½ (DROP COLUMN column_name)¡£
Òª¸Ä±ä±íÖÐÁеÄÊý¾ÝÀàÐÍ£¬ÇëʹÓÃÏÂÁÐÓï·¨£º
ALTER TABLE table_name
ALTER COLUMN column_name datatype
ԭʼµÄ±í (ÓÃÔÚÀý×ÓÖеÄ)£º
Persons ±í:
Id

LastName

FirstName

Address

City
1

Adams

John

Oxford Street

London
2

Bush

George

Fifth Avenue

New York
3

Carter

Thomas

Changan Street

Beijing
SQL ALTER TABLE ʵÀý
ÏÖÔÚ£¬ÎÒÃÇÏ£ÍûÔÚ±í "Persons" ÖÐÌí¼ÓÒ»¸öÃûΪ "Birthday" µÄÐÂÁС£
ÎÒÃÇʹÓÃÏÂÁÐ SQL Óï¾ä£º
ALTER TABLE Persons
ADD Birthday date
Çë×¢Ò⣬ÐÂÁÐ "Birthday" µÄÀàÐÍÊÇ date£¬¿ÉÒÔ´æ·ÅÈÕÆÚ¡£Êý¾ÝÀàÐ͹涨ÁÐÖпÉÒÔ´æ·ÅµÄÊý¾ÝµÄÀàÐÍ¡£
Ð嵀 "Persons" ±íÀàËÆÕâÑù£º
Id

LastName

FirstName

Address

City

Birthday
1

Adams

John

Oxford Street

London
2

Bush

George

Fifth Avenue

New York
3

Carter

Thomas

Changan Street

Beijing
¸Ä±äÊý¾ÝÀàÐÍʵÀý
ÏÖÔÚÎÒÃÇÏ£Íû¸Ä±ä "Persons" ±íÖÐ "Birthday" ÁеÄÊý¾ÝÀàÐÍ¡£
ÎÒÃÇʹÓÃÏÂÁÐ SQL Óï¾ä£º
ALTER TABLE Persons
ALTER COLUMN Birthday year
Çë×¢Ò⣬"Birthday" ÁеÄÊý¾ÝÀàÐÍÊÇ year£¬¿ÉÒÔ´æ·Å 2 λ»ò 4 λ¸ñʽµÄÄê·Ý¡£
DROP COLUMN ʵÀý
½ÓÏÂÀ´£¬ÎÒÃÇɾ³ý "Person" ±íÖÐµÄ "Birthday" ÁУº
ALTER TABLE Person
DROP COLUMN Birthday
Persons ±í»á³ÉΪÕâÑù:
Id

LastName

FirstName

Address

City
1

Adams

John

Oxford Street

London
2

Bush

George

Fifth Avenue

New York
3

Carter

Thomas

Changan Street

Beijing


Ïà¹ØÎĵµ£º

SQLº¯ÊýÖ®ËÄÉáÎåÈë

SQLº¯ÊýÖ®ËÄÉáÎåÈ루ת×Ôhttp://ln1058.javaeye.com/blog/191502£©
ÎÊÌâ1£º
SELECT CAST('123.456' as decimal) ½«»áµÃµ½ 123£¨Ð¡ÊýµãºóÃæµÄ½«»á±»Ê¡ÂÔµô£©¡£
Èç¹ûÏ£ÍûµÃµ½Ð¡ÊýµãºóÃæµÄÁ½Î»¡£
ÔòÐèÒª°ÑÉÏÃæµÄ¸ÄΪ
SELECT CAST('123.456' as decimal(38, 2)) ===>123.46
×Ô¶¯ËÄÉáÎåÈëÁË£ ......

±ÜÃâSQL×¢ÈëºÍÌØÊâ×Ö·ûµÄÒ»ÖÖ·½·¨

 µÝ¹éС̸×Ô±¸C#¸¨Öúº¯Êý
ʮ08
±ÜÃâSQL×¢ÈëºÍÌØÊâ×Ö·ûµÄÒ»ÖÖ·½·¨
C#Add comments
±ÜÃâSQL×¢ÈëºÍÌØÊâ×Ö·ûµÄ°ì·¨Óкܶ࣬²»Í¬Êý¾Ý¿âÒ²Óв»Í¬Êý¾Ý¿âµÄ½â¾ö·½°¸£¬ADO.NETÖÐʹÓÃDbCommand.Parameters½â¾öÕâ¸öÎÊÌ⣬ΪÁËÁ˽âËûµÄÔ­Àí£¬ÎÒ²éÁËÒ»ÏÂ.NETÖÐSQLCommandµÄÔ´´úÂëºÍMySQL.NETÖÐMySQLCommandµÄÔ´´úÂë¡£
.NETÔ´´ú ......

PL/SQL developerÔ¶³Ì·ÃÎÊÊý¾Ý¿âÅäÖ÷½·¨

ʹÓÃPL/SQL developerÔ¶³Ì·ÃÎÊoracleÊý¾Ý¿âʱ£¬Ê×ÏÈҪȷ¶¨±¾»úÖÐ×°ÓÐoracle¿Í»§¶Ë¡£Ä¿Ç°»¹²»ÖªµÀÄÄÀïµ¥¶ÀµÄoracle¿Í»§¶Ë°²×°°ü¡££¨ÒòΪÎÒÓõÄÊÇoracle10g£¬oracle10g°²×°µÄ¹ý³ÌÖÐûÓÐÌض¨µÄ¿Í»§¶ËÑ¡ÏËùÒÔÎÒÒ»°ã¶¼ÊÇÔÚ±¾»úÓð²×°oracleËùÓй¦ÄÜ£©
ÔÚ±¾»ú°²×°ºÃoracle¿Í»§¶Ëºó£¬ÎÒÃÇÔÚ±¾»ú(¼´¿Í»§¶Ë)µÄoracleµÄ°²×°Ä¿Â¼Ï ......

½â¾ö°²×°SQL Server2000 Îļþ¹ÒÆð

      1.²»ÓÃÍ˳öSQL2000°²×°³ÌÐò,Ö±½ÓÇл»µ½×ÀÃæ.
¡¡¡¡2.´ò¿ª×¢²á±í±à¼­Æ÷£¨ÔÚ“ÔËÐДÖÐÇÃÈë“regedit”Ö®ºó»Ø³µ¼´¿É£©£¬¶¨Î»µ½×¢²á±íµÄHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager½Úµã.
¡¡¡¡3.µ¥»÷“Session Manager”Õâ¸ö½Úµã£¬ ......

ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â

ORACLEÊý¾Ý¿âÀï±íµ¼ÈëSQL ServerÊý¾Ý¿â
   
  1¡¢ÔÚÄ¿µÄSQL ServerÊý¾Ý¿â·þÎñÆ÷ÉÏ°²×°ORACLE ClientÈí¼þ»òÕßORACLE ODBC Driver.
    ÔÚ$ORACLE_HOME\network\admin\tnsnames.oraÀïÅäÖÃORACLEÊý¾Ý¿âµÄ±ðÃû(service name)¡£
   
  2¡¢ÔÚWIN2000»òÕßwin200 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ