VB+SQL±àдÊý¾Ý¿â¹ÜÀíϵͳ
²ÎÕÕ°¸Àý½Ì³Ì½¨Á¢µÄÊý¾Ý¿â¹ÜÀíϵͳÔÚÉõ¶à·½Ã涼´æÔÚÎÊÌâ¡£¿ÉÄÜÊÇÐÂÊÖ£¬²»¹ÜÊǶÔÓÚ´óÒ»¾Íѧ¹ýµÄVB±à³Ì»¹ÊÇÕâ¸öѧÆÚ¸Õ½Ó´¥µÄSQL£¬ºÜ¶àСÎÊÌâ³£³£³öÏÖÔÚµ÷ÊÔ¹ý³ÌÖС£ÏëÇëÊìϤʹÓÃÕâÁ½¸öƽ̨µÄ¸ßÊÖ°ïæָµãһϡ£
1.ÈçºÎ½â¾öDataGridÖжà¸öcolumnºÍSQLÖжà¸ö±íµÄ°ó¶¨£¿Ä¿µÄÊÇÏëÔËÐÐʱÔÚDataGridÖÐÏÔʾ¶à¸ö±íÖкϲ¢µÄÐÅÏ¢£¬»òÊÇÔÚDataGridÖÐcolumnÏÔʾµÄÐÅÏ¢À´×ÔSQLDµÄ¶à¸ö±í¡£
2.TreeviewÈçºÎÏÔʾһ¶þ¼¶Ä¿Â¼£¿ÎÒÒѾÔÚvbÓï¾äÖÐдÁË“TreeView1.Nodes.Add ("ԺϵÐÅÏ¢")”£¬ÔËÐÐÁ¬µÚÒ»¼¶Ä¿Â¼¶¼ÎÞ·¨ÏÔʾ£¬³öÏ֓δ·¢ÏÖÔªËØ”´íÎóÌáʾ¡£²Î¿¼ÊéºÍÍøÉÏÕÒÁ˺öà×ÊÁÏ£¬¿ÉÊǶ¼Ã»ÓÐÏêϸµÄ½âÊͺͲÙ×÷²½Öè¡£
……
ÉÏÁË°ë¸öѧÆÚµÄSQL¾Í²¼ÖÃÁËÕâô¸ö×÷Òµ£¬ÐÄÓÐÓà¶øÁ¦²»×㣬»ù´¡²»ºÃ£¬×öÆðÀ´·Ñ¾¢¡£
Ïà¹ØÎĵµ£º
declare @tb3 table (ÉÌÆ·±àºÅ nvarchar(10),Åú´ÎºÅ nvarchar(10),¿â´æÊýÁ¿ int,³ö¿âÊýÁ¿ int)
declare @tb1 table (ÉÌÆ·±àºÅ nvarchar(10),Åú´ÎºÅ nvarchar(10),¿â´æÊýÁ¿ int)
insert into @tb1 select '0001','090801',200
union all select '0001','090501',50
&n ......
ʹÓà SQL Server ʼþ̽²éÆ÷µÄ·½°¸
ʹÓà SQL Server ProfilerµÄµÚÒ»²½ÊÇÈ·¶¨¼àÊÓ SQL Server ʵÀýµÄÔÒò¡£±¾Ö÷ÌâÌÖÂÛʹÓà SQL Server ProfilerÊÕ¼¯¸ú×ÙÐÅÏ¢µÄµäÐÍ·½°¸¡£
ʹÓà SQL Server ProfilerµÄµäÐÍ·½°¸°üÀ¨£º
²éÕÒÖ´ÐÐÇé¿ö×î²îµÄ²éѯ¡£
ÀýÈ磬¿ÉÒÔ´´½¨Ò»¸ö²¶»ñÓë TSQL ºÍ Stored Procedure ʼþÀࣨRPC:Completed ......
1.ϵͳ±äÁ¿º¯Êý
£¨1£©SYSDATE
¸Ãº¯Êý·µ»Øµ±Ç°µÄÈÕÆÚºÍʱ¼ä¡£·µ»ØµÄÊÇOracle·þÎñÆ÷µÄµ±Ç°ÈÕÆÚºÍʱ¼ä¡£
select sysdate from dual;
insert into purchase values
(‘Small Widget’,’SH’,sysdate, 10);
insert into purchase values
(‘Meduem Wodget’,’SH’, ......
1.Óû§¹ÜÀí
£¨1£©½¨Á¢Óû§£¨Êý¾Ý¿âÑéÖ¤£©
CREATE USER smith
IDENTIFIED BY smith_pwd
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA 5m ON users;
£¨2£©ÐÞ¸ÄÓû§
ALTER USER smith
QUOTA 0 ON SYSTEM;
£¨3£©É¾³ýÓû§
DROP USER smith;
DROP USER ......
sql unionÓ÷¨ºÍsql union allÓ÷¨,sql unionЧÂÊ
1¡¢sql unionÓ÷¨
sql unionÔÚ²éѯÖпÉÒÔ½«Á½¸öSQL Óï¾äµÄ½á¹ûºÏ²¢ÆðÀ´¡£Èç¹ûÕâÑù¿´µÄ»°£¬ UNION ¸ú JOIN ÊÇÏàËƵģ¬Á½¸öÖ¸Á¿ÉÒÔÓɶà¸ö±í¸ñÖÐߢȡ×ÊÁÏ¡£
sql unionµÄÒ»¸öÏÞÖÆÊÇÁ½¸ö SQL Óï¾äËù²úÉúµÄÀ¸Î»ÐèÒªÊÇͬÑùµÄ×ÊÁÏÖÖÀà¡£ÁíÍ⣬µ±ÎÒÃÇÓà UNIONÕâ¸öÖ¸Áîʱ£¬Î ......