《SQL 21日自学通(V3.0)(PDF格式)》第154章


GROUP BY '; 。。。' 
GROUP BY 语句可以将所以列名相同的行组织在一起 
HAVING 
HAVING
HAVING 只有在 GROUP BY下有效 它用以限制选择的组要满足指定的搜索条件 
INTERSECT 
INTERSECT 
INTERSECT 返回两个SELECT语句中的所有公共元素 
ORDER BY 
ORDER BY
ORDER BY 语句可以通过指定列句来对内容进行排序 
ROLLBACK TRANSACTION 
ROLLBACK TRANSACTION 语句的作用是使一个事务 从BEGIN TRANSACTION语 
句运行时起 中的所有工作全部取消 
REVOKE 
REVOKE role FROM user 
502 
…………………………………………………………Page 503……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪 
或 REVOKE {object_priv | ALL 'PRIVILEGES'} 
'; {object_priv | ALL 'PRIVILEGES'} ' 。。。 
ON 'schema。'object 
FROM {user | role | PUBLIC} '; {user | role | PUBLIC}' 。。。 
REVOKE 命令将删除一个用户的所有的数据库权限 — — 无论是系统权限还是规则 
SELECT 
SELECT 'DISTINCT | ALL' 
SELECT 语句是每一个获得数据的语句的开始 修正字 DISTINCT 可以指定让它返回 
一个重复的数值 ALL 是默认的 返回全部数据 
SET TRANSACTION 
SQL》 SET TRANSACTION (READ ONLY | USE ROLLBACK SEGMENT); 
SET TRANSACTION 可以让用户指定什么时候事务应该开始 READ ONLY 选项会 
锁定一组记录集直到事务结束以确保在这一过程中数据没有被改变过 
UNION 
UNION 
UNION 语句会返回两个SELECT语句中的所有元素 
WHERE 
WHERE
WHERE 语句限制返回的行必须满足指定的条件 
* 
* 可以代替一个表中的所有的列 
503 
…………………………………………………………Page 504……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪 
附件 B 在第 14 天中的 C++源代码清单 
// tyssqvw。h : interface of the CTyssqlView class 
// 
///////////////////////////////////////////////////////////////////////////// 
class CTyssqlSet; 
class CTyssqlView : public CRecordView 
{ 
protected: // create from serialization only 
CTyssqlView(); 
DECLARE_DYNCREATE(CTyssqlView) 
public: 
//{{AFX_DATA(CTyssqlView) 
enum { IDD = IDD_TYSSQL_FORM }; 
CTyssqlSet* m_pSet; 
//}}AFX_DATA 
// Attributes 
public: 
CTyssqlDoc* GetDocument(); 
// Operations 
public: 
virtual CRecordset* OnGetRecordset(); 
// Implementation 
public: 
virtual ~CTyssqlView(); 
#ifdef _DEBUG 
virtual void AssertValid() const; 
virtual void Dump(CDumpContext& dc) const; 
#endif 
504 
…………………………………………………………Page 505……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪 
protected: 
virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support 
virtual void OnInitialUpdate(); // called first time after construct 
// Generated message map functions 
protected: 
//{{AFX_MSG(CTyssqlView) 
// NOTE the ClassWizard will add and remove member functions here。 
// DO NOT EDIT what you see in these blocks of generated code ! 
//}}AFX_MSG 
DECLARE_MESSAGE_MAP() 
}; 
#ifndef _DEBUG // debug version in tyssqvw。cpp 
inline CTyssqlDoc* CTyssqlView::GetDocument() 
{ return (CTyssqlDoc*)m_pDocument; } 
#endif 
///////////////////////////////////////////////////////////////////////////// 
// tyssql。h : main header file for the TYSSQL application 
// 
#ifndef __AFXWIN_H__ 
#error include "stdafx。h" before including this file for PCH 
#endif 
#include 〃resource。h〃 // main symbols 
///////////////////////////////////////////////////////////////////////////// 
// CTyssqlApp: 
// See tyssql。cpp for the implementation of this class 
// 
class CTyssqlApp : public CWinApp 
{ 
public: 
CTyssqlApp(); 
505 
…………………………………………………………Page 506……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪 
// Overrides 
virtual BOOL InitInstance(); 
// Implementation 
//{{AFX_MSG(CTyssqlApp) 
afx_msg void OnAppAbout(); 
// NOTE the ClassWizard will add and remove member functions here。 
// DO NOT EDIT what you see in these blocks of generated code ! 
//}}AFX_MSG 
DECLARE_MESSAGE_MAP() 
}; 
///////////////////////////////////////////////////////////////////////////// 
// tyssqset。h : interface of the CTyssqlSet class 
// 
///////////////////////////////////////////////////////////////////////////// 
class CTyssqlSet : public CRecordset 
{ 
DECLARE_DYNAMIC(CTyssqlSet) 
public: 
CTyssqlSet(CDatabase* pDatabase = NULL); 
// Field/Param Data 
//{{AFX_FIELD(CTyssqlSet; CRecordset) 
CString m_NAME; 
CString m_ADDRESS; 
CString m_STATE; 
CString m_ZIP; 
CString
小说推荐
返回首页返回目录