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

¼òµ¥µÄ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 Server 2000ʱÈýÖÖ³£¼û³ö´íÐÅÏ¢¼°½â¾ö·½·¨

Çé¿ö£ºÎÒÒÔǰ°²×°¹ýSQL Server 2000£¬Å¶£¬»¹ÓÐSQL Server 2005¡¢MySQLÄØ£¬ºóÀ´ÏµÍ³ÖØ×°ÁË£¬²»¹ýÕâЩӦÓóÌÐò¶¼ÔÚEÅÌÀ²»ÔÚϵͳÅÌÀ¾ÍÔÚ°²×°µÄʱºò³öÏÖÈçÏÂÈý¸ö´íÎó£¬ÔÚ´ËÖð¸ö½â¾ö˵Ã÷ÈçÏ£º
ÎÊÌâÒ»£º
±¨´íÐÅÏ¢£ºÒÔǰµÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú¡£
½â¾ö·½ ......

ʵÏÖ¶àÐкϲ¢Ò»ÐеÄSQLд·¨

[ORACLE]
ÏîÄ¿ÖÐÓöµ½Ò»¸öÐèÇó£¬ÐèÒª½«¶àÐкϲ¢ÎªÒ»ÐС£
±í½á¹¹ÈçÏ£º
NAME                            Null           ......

[SQL]SQLÐÔÄܵ÷ÓÅ

³õ¼¶Æª —— ¼òµ¥²éѯÓï¾äµÄµ÷ÓÅ ÀîÃ÷»Û , Èí¼þ¹¤³Ìʦ, IBM­
ÀîÃ÷»Û£¬ÔÚ IBM ÖйúÈí¼þ¿ª·¢ÖÐÐÄ Data Studio ÍŶӹ¤×÷´ÓÊ InfoSphere Warehouse Administration Console µÄ¹¦ÄܲâÊÔ¹¤×÷¡£ÔøÔÚ developerWorks ·¢±í¡¶½« DB2 DWE 9.1.X Ç¨ÒÆµ½ DB2 Warehouse 9.5¡·¡¢¡¶InfoSphere Warehouse SQL ²Ö´¢ÃüÁîÐнӿ ......

sql:´æ´¢¹ý³Ì£¬ÊÂÎñ£¬out²ÎÊý

CREATE proc [dbo].[proc_DeleteTemplet] (@templeId varchar(15),@errorMessage varchar(50) output)
as
begin
  declare @error int
  set @error =0
  begin tran
  delete from tc_templet_Head where fBillNo=@templeId
  set @error=@error+@@error
  delete from tc_templet_ ......

ÔÚc#ÖеÄÈ¡µÃsql´æ´¢¹ý³ÌµÄoutput²ÎÊý

һֱûÓÐÕÒµ½Ò»Öֺõķ½·¨À´ÒýÓÃÓзµ»ØÖµµÄ´æ´¢¹ý³ÌµÄ·½·¨£¬Ê¹ÎÒÔÚÌí¼ÓÊý¾ÝÖÐ×ßÁ˲»ÉÙµÄÍä·£¬×î½ü£¬ÔÚ²éÔÄÁË´óÁ¿µÄ×ÊÁÏÖ®ºó£¬ÖÕÓÚÔÚ΢ÈíµÄÒ»¸öʵÀýÖÐÕÒµ½ÁËÒ»ÖÖÁ¼ºÃµÄ·½·¨¡£
Ê×ÏȱàдºÃÒ»Óзµ»ØÖµµÄ´æ´¢¹ý³Ì
create procedure proc_name
   @para1 nchar(20),    --ÊäÈë²ÎÊý
   @ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ