SQL-Befehle von FoxPro Grundlagen der SQLProgrammierung mit Microsoft Visual FoxPro Wizards & Builders GmbH Diese Schulung dient zur Einführung in die Grundlagen der Standard Query Language (SQL) und deren Anwendung in Microsoft Visual FoxPro Wizards & Builders GmbH Themenübersicht Defintionen CREATE TABLE ALTER TABLE SQL-SELECT Wizards & Builders GmbH Umfangreichere Befehle USE Norequery, Nodata Online, Admin CREATE TABLE ALTER TABLE SQL-SELECT WHERE, GROUP/HAVING, JOINS Wizards & Builders GmbH SQL-Historie in den 70ern von IBM entwickelt 1986 1.ANSI Standard 1987 ISO Standard 1989 2. ANSI Standard, Level I und II 1992 3.ANSI Standard, SQL2 an SQL3 wird zur Zeit gearbeitet Wizards & Builders GmbH SQL-Create CREATE TABLE TableName1 NAME LongTableName [FREE] (FieldName1 FieldType (nFieldWidth , nPrecision) NULL | NOT NULL CHECK ERROR cMessageText1 DEFAULT Wert PRIMARY KEY | UNIQUE REFERENCES TableName2 TAG TagName1 NOCPTRANS FOREIGN KEY eExpression4 TAG TagName4 [NODUP] FROM ARRAY ArrayName Wizards & Builders GmbH SQL-AlterTable ALTER TABLE TableName1 [ADD / ALTER / DROP [COLUMN] FieldName3] [SET CHECK lExpression3 [ERROR cMessageText3]] [DROP CHECK] [ADD PRIMARY KEY eExpression3 TAG TagName2] [DROP PRIMARY KEY] [ADD UNIQUE eExpression4 [TAG TagName3]] [DROP UNIQUE TAG TagName4] [ADD FOREIGN KEY [eExpression5] TAG TagName4 REFERENCES TableName2 [TAG TagName5]] [DROP FOREIGN KEY TAG TagName6 [SAVE]] [RENAME COLUMN FieldName4 TO FieldName5] [NOVALIDATE] Wizards & Builders GmbH SQL-Select SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] [Alias.] Select_Item [AS Column_Name] FROM [FORCE] [DatabaseName!]Table [Local_Alias] [[INNER | LEFT [OUTER] | RIGHT [OUTER] | FULL [OUTER] JOIN DatabaseName!]Table [Local_Alias] [ON JoinCondition …] [[INTO Destination] [TO FILE [ADDITIVE] | TO PRINTER [PROMPT] [PREFERENCE PreferenceName] [NOCONSOLE] [PLAIN] [NOWAIT] [WHERE JoinCondition [AND / OR JoinCondition ...] [GROUP BY GroupColumn [, GroupColumn ...]] [HAVING FilterCondition] [UNION [ALL] SELECTCommand] [ORDER BY Order_Item [ASC | DESC] Wizards & Builders GmbH Vielen Dank! Das waren die Themen: Historie CREATE ALTER TABLE SELECT Wizards & Builders GmbH Wenn Fragen bestehen: Wizards & Builders Methodische SoftwareEntwicklung GmbH Frankfurter Str. 21b 61476 Kronberg Tel.: 06173-950906 Fax: 06173-950907 CIS: 101605,175 Wizards & Builders GmbH