The CRUD general options can be used to add the CRUD procedures that stand for the CREATE, READ, UPDATE, and DELETE statements. In SQL, they refer to Insert, Select, Update, and Delete.
The topic includes the following sections:
On the General page, you can configure the following options:
By default, all options are enabled, and By Ordinal Number is selected.
To access the CRUD options, select CRUD > General in the Options dialog.
After you have customized a CRUD template, you can generate a CRUD script for the table. To do this, in Object Explorer, right-click the required table and select SQL Complete > Script Table as > specific CRUD procedure. This will generate a script matching the customized CRUD procedure in a new SQL document.
The CRUD Select options allow users to generate customizable and reusable code templates of the Select procedure for any table. The templates can be executed using the SELECT statement to retrieve data or a set of records based on the primary key specified in the input parameter. By default, the name of the CRUD procedure ends with the name of the operation - usp_$table$_Select.
The Select template contains placeholders for variables that can be replaced with the actual values:
If you want to get all records with input parameters that equal NULL, select the Return all data if input parameters are null checkbox.
For more information about the template parameters and options, see Generate CRUD procedures for a table.
To access the CRUD Select, select CRUD > Select in the Options dialog.
The CRUD Insert options allow users to generate customizable and reusable code templates of the Insert procedure for any table. The templates can be executed using the INSERT statement to insert columns and values into the table. By default, the name of the CRUD procedure ends with the name of the operation - usp_$table$_Insert.
The Select template contains placeholders for variables that can be replaced with the actual values:
If you want to return the results set of the inserted row, select the Return inserted row checkbox.
For more information about the template parameters and options, see Generate CRUD procedures for a table.
To access the CRUD Insert, select CRUD > Insert in the Options dialog.
The CRUD Update options allow users to generate customizable and reusable code templates of the Update procedure for any table. The templates can be executed using the UPDATE statement to modify the data in the table. By default, the name of the CRUD procedure ends with the name of the operation - usp_$table$_Update.
The Update template contains placeholders for variables that can be replaced with the actual values:
If you want to return the updated row, select the Return updated row checkbox.
For more information about the template parameters and options, see Generate CRUD procedures for a table.
To access the CRUD Update, select CRUD > Update in the Options dialog.
The CRUD Delete options allow users to generate customizable and reusable code templates of the Delete procedure for any table. The templates can be executed using the DELETE statement to remove rows from the table. By default, the name of the CRUD procedure ends with the name of the operation - usp_$table$_Delete.
The Delete template contains placeholders for variables that can be replaced with the actual values:
For more information about the template parameters and options, see Generate CRUD procedures for a table.
To access the CRUD Delete, select CRUD > Delete in the Options dialog.