AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Herramientas / WDSQL
  • Overview
  • Creating a script
  • Creating a script from the main window of WDSQL
  • Creating a script for creating a new table in the current database
  • Running a script
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
A script is a set of SQL commands used to perform a specific operation (create a new table in the database, insert records, ...).
A script includes several lines. Each script line contains an SQL code that can be run independently.
A script must be run line by line, in Batch mode.
Remark: The following operations are only possible on files accessed via an OLE DB provider, ODBC driver or native access:
  • Creating the structure of a file/table.
  • Modifying the structure of a file/table.
  • Deleting the structure of a file/table.
Creating a script
A script can be created:
  • fom the main window of WDSQL,
  • from the wizard for table creation (script for table creation).
Remarks:
  • To save a script, select "File .. Save a query" or click .
  • To print the SQL code of a script, select "File .. Print the source code of the query" or click .

Creating a script from the main window of WDSQL

WDSQL proposes several methods to help you create the script in SQL:
  • To view and/or use existing fields in the current database, click on the icon.. For more details, see Database structure.
  • To view and/or use the various SQL keywords, click on the icon.
  • To view the different types of variables recognized by the current database, click on the icon.

Creating a script for creating a new table in the current database

To create a script for creating a new table in the current database:
  1. Select "File .. Create a query" (or click ). The wizard starts.
  2. Select "A script for creating a new table". Go to the next step.
  3. Type the name of the table to create ("Table name" option).
  4. For each table item:
    • Type the item name ("Control name" option).
    • Click the "Add" button.
    • Specify the type of item. The available types depend on the current database.
    • Specify the item size.
    • Specify whether the item must be indexed.
    • Specify whether the item can be null.
  5. Check (if necessary) "Generate the DROP TABLE command" to automatically generate the "DROP TABLE" command.
    Reminder: The DROP TABLE command deletes a table.
  6. Finish the wizard. The SQL code of the script for table creation is automatically displayed in the main window of WDSQL.
Running a script
To run a script:
  1. Load (if necessary) the script to run in WDSQL (select "File .. Load a query" or click ).
  2. Select "Execution .. Run a script in batch" (or click ).
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local