¼òµ¥µÄSQLÃæÊÔÌâ
1. Q. What is a join?
A. Join is a process of retrieve pieces of data from different sets (tables) and returns them to the user or program as one joined collection of data.
2. Q. Can a table have more than one foreign key defined?
A. A table can have any number of foreign keys defined. It can have only
one primary key defined.
3. Q. List all the possible values that can be stored in a BOOLEAN data field.
A. There are only two values that can be stored in a BOOLEAN data field:
-1(true) and 0(false).
4. Q. What is a stored procedure?
A. A procedure is a group of PL/SQL statements that can be called by
a name. Procedures do not return values they perform tasks.
5. Q. What is Normalization?
A. The process of table design is called normalization.
6. Q. Write a SQL SELECT sample of the concatenation operator.
A. SELECT LastName ||',' || FirstName, City from Students;
7. Q. Is the WHERE clause must appear always before the GROUP BY clause in SQL SELECT ?
A. Yes.
The proper order for SQL SELECT
clauses is: SELECT, from, WHERE, GROUP BY, HAVING, ORDER BY.
Only the SELECT and from clause are mandatory.
8. Q. Which operator do you use to return all of the rows
from one query except rows are returned in a second query?
A. You use the MINUS operator to return all rows from one query except
where duplicate rows are found in a second query. The UNION operator
returns all rows from both queries minus duplicates. The UNION ALL operator
returns all rows from both queries including duplicates.
The INTERSECT operator returns only those rows that exist in both queries.
9. Q. Which of the following statements are Data Manipulation Language commands?
A. INSERT
B. UPDAT
Ïà¹ØÎĵµ£º
SQLÓï¾äµÄÓÅ»¯¾ÍÊǽ«ÐÔÄܽϵ͵ÄSQLÓï¾äת»»´ï³ÉͬÑùÄ¿µÄÐÔÄÜÓÅÒìµÄSQLÓï¾ä
ÏÂÃæÎÒÃÇÒ»ÆðÀ´¿´¿´Ò»Ð©¿ÉÒÔÓÅ»¯SQLµÄ·½·¨£¬Ï£Íû´ó¼Ò¶àÌá³öÒâ¼ûÎÒÃǹ²Í¬Ñ§Ï°»òÕßÊÇ´ó¼ÒÓÐʲôºÃµÄÓÅ»¯·½·¨¿ÉÒÔÌá³öÀ´¹²Ïíһϡ£
µÚÒ»ÖÖÓÅ»¯£¨Ê¹ÓÃÖ¸¶¨ÁдúÌæ”*”£©
ʹÓÓ*&rdquo ......
²éѯÓÅ»¯µÄÄ¿µÄÊÇÌá¸ßÊý¾Ý¼ìË÷ËÙ¶È£¬Ìá¸ßÊý¾Ý¼ìË÷Òâζ׿õÉÙ´ÅÅÌ
IO
¶ÁÈ¡»òÕßÂß¼ÄÚ´æ¶ÁÈ¡´ÎÊý£¬ÕâÐèÒª´ÓÁ½¸ö·½ÃæÈëÊÖ£ºÊý¾ÝÒª¾¡¿ÉÄܵĻº´æµ½ÄÚ´æ¡¢¾¡¿ÉÄܵÄʹÓÃË÷Òý¡£ÄÚ´æµÄÎÊÌâ¿ÉÒԲμû
:
http://msdn.microsoft.com/zh-cn/library/ms188284.aspx
£¬±¾ÎÄÖ÷ÒªÊÇÌåÏÖÈçºÎʹÓÃË÷ÒýÀ´Ìá¸ßËÙ¶È¡£¾ßÌå·½·¨£º
1) ......
½¨Á¢Ò»¸ö Web Ó¦Ó㬷ÖÒ³ä¯ÀÀ¹¦Äܱز»¿ÉÉÙ¡£Õâ¸öÎÊÌâÊÇÊý¾Ý¿â´¦ÀíÖÐÊ®·Ö³£¼ûµÄÎÊÌâ¡£¾µäµÄÊý¾Ý·ÖÒ³·½·¨ÊÇ:ADO ¼Í¼¼¯·ÖÒ³·¨£¬Ò²¾ÍÊÇÀûÓÃADO×Ô´øµÄ·ÖÒ³¹¦ÄÜ£¨ÀûÓÃÓα꣩À´ÊµÏÖ·ÖÒ³¡£µ«ÕâÖÖ·ÖÒ³·½·¨½öÊÊÓÃÓÚ½ÏСÊý¾ÝÁ¿µÄÇéÐΣ¬ÒòΪÓα걾ÉíÓÐȱµã£ºÓαêÊÇ´æ·ÅÔÚÄÚ´æÖУ¬ºÜ·ÑÄÚ´æ¡£ÓαêÒ»½¨Á¢£¬¾Í½«Ïà¹ØµÄ¼ÇÂ¼Ëø×¡£¬Ö±µ½È¡ÏûÓ ......
Use Êý¾Ý¿â
DECLARE @ProcName varchar(50)
Create Table #tmpName(Content varchar(2000))
Create Table #tmp(ProcName varchar(2000),Content1 varchar(8000))
--¶¨ÒåÒ»¸öÓαê
DECLARE SearchProc CURSOR FOR
--²éѯÊý¾Ý¿âÖд洢¹ý³ÌµÄÃû³Æ£¬¾¡Á¿È¥³ýϵͳPROC£¬¿ÉÒÔ¸ù¾Ýcrdateʱ¼ä×Ö¶ÎÀ´Ñ°ÕÒ·ÇϵͳPROC
select n ......