Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wizards & Builders GmbH SQL-Befehle von FoxPro Grundlagen der SQL- Programmierung mit Microsoft Visual FoxPro.

Similar presentations


Presentation on theme: "Wizards & Builders GmbH SQL-Befehle von FoxPro Grundlagen der SQL- Programmierung mit Microsoft Visual FoxPro."— Presentation transcript:

1 Wizards & Builders GmbH SQL-Befehle von FoxPro Grundlagen der SQL- Programmierung mit Microsoft Visual FoxPro

2 Wizards & Builders GmbH Diese Schulung dient zur Einführung in die Grundlagen der Standard Query Language (SQL) und deren Anwendung in Microsoft Visual FoxPro

3 Wizards & Builders GmbH Themenübersicht Defintionen Defintionen CREATE TABLE CREATE TABLE ALTER TABLE ALTER TABLE SQL-SELECT SQL-SELECT

4 Wizards & Builders GmbH Umfangreichere Befehle USE USE Norequery, Nodata Norequery, Nodata Online, Admin Online, Admin CREATE TABLE CREATE TABLE ALTER TABLE ALTER TABLE SQL-SELECT SQL-SELECT WHERE, GROUP/HAVING, JOINS WHERE, GROUP/HAVING, JOINS

5 Wizards & Builders GmbH SQL-Historie n n in den 70ern von IBM entwickelt n n 1986 1.ANSI Standard n n 1987 ISO Standard n n 1989 2. ANSI Standard, Level I und II n n 1992 3.ANSI Standard, SQL2 n n an SQL3 wird zur Zeit gearbeitet

6 Wizards & Builders GmbH SQL-Create CREATE TABLE TableName1 CREATE TABLE TableName1 NAME LongTableName [FREE] NAME LongTableName [FREE] (FieldName1 FieldType (nFieldWidth, nPrecision) (FieldName1 FieldType (nFieldWidth, nPrecision) NULL | NOT NULL NULL | NOT NULL CHECK ERROR cMessageText1 CHECK ERROR cMessageText1 DEFAULT Wert DEFAULT Wert PRIMARY KEY | UNIQUE PRIMARY KEY | UNIQUE REFERENCES TableName2 TAG TagName1 REFERENCES TableName2 TAG TagName1 NOCPTRANS NOCPTRANS FOREIGN KEY eExpression4 TAG TagName4 [NODUP] FOREIGN KEY eExpression4 TAG TagName4 [NODUP] FROM ARRAY ArrayName FROM ARRAY ArrayName

7 Wizards & Builders GmbH SQL-AlterTable ALTER TABLE TableName1 ALTER TABLE TableName1 [ADD / ALTER / DROP [COLUMN] FieldName3] [ADD / ALTER / DROP [COLUMN] FieldName3] [SET CHECK lExpression3 [ERROR cMessageText3]] [SET CHECK lExpression3 [ERROR cMessageText3]] [DROP CHECK] [DROP CHECK] [ADD PRIMARY KEY eExpression3 TAG TagName2] [ADD PRIMARY KEY eExpression3 TAG TagName2] [DROP PRIMARY KEY] [DROP PRIMARY KEY] [ADD UNIQUE eExpression4 [TAG TagName3]] [ADD UNIQUE eExpression4 [TAG TagName3]] [DROP UNIQUE TAG TagName4] [DROP UNIQUE TAG TagName4] [ADD FOREIGN KEY [eExpression5] TAG TagName4 [ADD FOREIGN KEY [eExpression5] TAG TagName4 REFERENCES TableName2 [TAG TagName5]] REFERENCES TableName2 [TAG TagName5]] [DROP FOREIGN KEY TAG TagName6 [SAVE]] [DROP FOREIGN KEY TAG TagName6 [SAVE]] [RENAME COLUMN FieldName4 TO FieldName5] [RENAME COLUMN FieldName4 TO FieldName5] [NOVALIDATE] [NOVALIDATE]

8 Wizards & Builders GmbH SQL-Select SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] [Alias.] Select_Item [AS Column_Name] [Alias.] Select_Item [AS Column_Name] FROM [FORCE] [DatabaseName!]Table [Local_Alias] FROM [FORCE] [DatabaseName!]Table [Local_Alias] [[INNER | LEFT [OUTER] | RIGHT [OUTER] | FULL [OUTER] JOIN [[INNER | LEFT [OUTER] | RIGHT [OUTER] | FULL [OUTER] JOIN DatabaseName!]Table [Local_Alias] [ON JoinCondition …] DatabaseName!]Table [Local_Alias] [ON JoinCondition …] [[INTO Destination] [TO FILE [ADDITIVE] | TO PRINTER [PROMPT] [[INTO Destination] [TO FILE [ADDITIVE] | TO PRINTER [PROMPT] [PREFERENCE PreferenceName] [PREFERENCE PreferenceName] [NOCONSOLE] [PLAIN] [NOWAIT] [NOCONSOLE] [PLAIN] [NOWAIT] [WHERE JoinCondition [AND / OR JoinCondition...] [WHERE JoinCondition [AND / OR JoinCondition...] [GROUP BY GroupColumn [, GroupColumn...]] [GROUP BY GroupColumn [, GroupColumn...]] [HAVING FilterCondition] [HAVING FilterCondition] [UNION [ALL] SELECTCommand] [UNION [ALL] SELECTCommand] [ORDER BY Order_Item [ASC | DESC] [ORDER BY Order_Item [ASC | DESC]

9 Wizards & Builders GmbH Vielen Dank! Das waren die Themen: Historie Historie CREATE CREATE ALTER TABLE ALTER TABLE SELECT SELECT

10 Wizards & Builders GmbH Wenn Fragen bestehen: Wizards & Builders Methodische Software- Entwicklung GmbH Frankfurter Str. 21b 61476 Kronberg Tel.: 06173-950906 Fax: 06173-950907 CIS: 101605,175


Download ppt "Wizards & Builders GmbH SQL-Befehle von FoxPro Grundlagen der SQL- Programmierung mit Microsoft Visual FoxPro."

Similar presentations


Ads by Google