SQL °´×é±ð¹ýÂËÖ¸¶¨Ìõ¼þµÄÊ×ÐмǼ
Ô´Ìù£ºhttp://topic.csdn.net/u/20100417/19/ebdc216a-acc9-4e04-80f3-dbada0b4f3fe.html?74846
Êý¾ÝÀàÐÍ£º
Code char(6)
CreateTime datetime
Price float
Status bit
Êý¾ÝÈçÏ£º
Code CreateTime Price Status
031002 2008-10-17 15:00:15 3.58 1
031002 2008-10-17 15:00:16 5.53 1
031002 2008-10-17 15:00:17 4.54 1
031002 2008-10-17 15:00:18 4.44 1
031002 2008-10-17 15:00:19 4.34 1
031002 2008-10-17 15:00:20 4.24 1
031012 2008-10-17 15:00:15 3.58 0
031012 2008-10-17 15:00:16 5.53 0
031012 2008-10-17 15:00:17 4.54 0
031012 2008-10-17 15:00:18 4.44 0
031012 2008-10-17 15:00:19 4.34 1
031012 2008-10-17 15:00:20 4.24 1
031012 2008-10-17 15:00:18 3.51 0
031012 2008-10-17 15:00:19 3.52 0
031012 2008-10-17 15:00:20 2.50 0
031012 2008-10-17 15:00:21 3.51 0
031012 2008-10-17 15:00:22 3.52 0
031012 2008-10-17 15:00:23 2.50 0
031012 2008-10-17 15:00:24 3.51 0
031012 2008-10-17 15:00:25 3.52 0
031012 2008-10-17 15:00:26 2.50 0
031033 2008-10-17 15:00:21 4.53 0
031033 2008-10-17 15:00:22 3.55 0
031033 2008-10-17 15:00:23 3.55 0
031033 2008-10-17 15:00:24 5.57 0
031033 2008-10-17 15:00:25 5.57 1
031033 2008-10-17 15:00:26 5.57 1
031033 2008-10-17 15:00:27 5.57 1
031033 2008-10-17 15:00:28 5.57 1
ÎÒÏëÒªµÄ½á¹ûÊÇ
031012 2008-10-17 15:00:19 4.34 1
031033 2008-10-17 15:00:25 5.57 1
µÃ³öÕâ¸ö½á¹ûµÄÒªÇóÊÇ: °´ÕÕCode·Ö×飬°´ÕÕʱ¼äascÅÅÐò Status
Ïà¹ØÎĵµ£º
Èçͼ1¡¢2£¬id=1µÄÊý¾ÝÊÇNULL£¬ÆäËûµÄΪ·ÇNULLµÄÊý¾Ý¡£
Ò»°ãÇé¿öÏ£¬»áÓÃÁ½ÖÖ·½·¨£¡
·½·¨1.t-sql£ºinsert into E values(1,'NULL')£¬²åÈëºó£¬ÔÚ´ò¿ª±íµÄÇé¿öÏ¿´µ½µÄ
ÊÇ'NULL'£¨ÎÒÏëÊÇΪÁËÇø·ÖNULL£¬²Å¼ÓµÄÒýºÅ£©£¬µ«ÊDzéѯµÄʱºò²»Ó°Ï죬ÏÔʾµÄÊÇNULL£¬
Èçͼ1¡¢2£¬idΪ6µÄÊý¾Ý¡£
Èç¹ûÒª²åÈë´øµ¥ÒýºÅµÄ'NULL'£¬insert i ......
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4¡¢Ëµ ......
Éϼ¯ÖÐ
//////////////////////////////////////////////////
select n5001 Ãŵê,n5002 ²¿ÃÅ,n5004 С·ÖÀà,n5019 ÉÌÆ·±àÂë,c01d21 ÉÌÆ·Ãû³Æ,
nvl(xse,0)-nvl(dzxs,0) ÏúÊÛ,
mle ëÀû,
nvl(xl,0)-nvl(dzsl,0) ÏúÁ¿
from
(select n5001,n5002,n5004,n5019,sum(n5011) xse,sum(n5016) mle,sum(n5023) xl
from ......
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname ......
http://kang275284.javaeye.com/blog/154331
Ò»¡¢ ÏȽéÉÜÒ»ÏÂoracle
µÄSGA£ºÊý¾Ý¿âµÄϵͳȫ¾ÖÇø£¬SGAÖ÷ÒªÓÉÈý²¿·Ö¹¹
³É£º¹²Ïí³Ø¡¢Êý¾Ý»º³åÇø¡¢ÈÕÖ¾»º³åÇø¡£
1¡¢ ¹²Ïí³ØÓÖÓÉÁ½²¿·Ö¹¹³É£º¹²ÏíSQL
Çø
ºÍÊý¾Ý×ֵ仺³åÇø¡£¹²ÏíSQL
ÇøרÃÅ´æ·ÅÓû§SQL
Ãü
Áoracle
ʹÓÃ×î½ü×îÉÙʹÓõÈÓÅÏȼ¶Ëã·¨À´¸üи²¸Ç£ ......