TCL Commands in SQL

TCL Commands in SQL

As you probably are aware, Tcl is Tool charge dialect, summons is the most fundamental part of the dialect. Tcl orders are implicit to the dialect with each having its own particular predefined capacity.

These orders frame the saved expressions of the dialect and can’t be utilized for other variable namings. The point of preference with these Tcl charges is that, you can characterize your own usage for any of these summons to supplant the first inherent usefulness.

Each of the Tcl charges approves the info and it lessens the work of the translator.

Tcl charge is really a rundown of words, with the principal word speaking to the summon to be executed. The following words speak to the contentions. Keeping in mind the end goal to gathering words into a solitary contention, we encase numerous words with “” or {}.

The sentence structure of Tcl charge is as per the following.                

Cmd_Name Arg_1 Arg_2 … Arg_N

Let’s try a simple example of Tcl command implementation.


puts “TCL Command Tutorial”

On execution of the above code, the following results will be produced. 

TCL Command Tutorial

In the above code, ‘puts’ is the Tcl_Cmd_Name and “TCL Command Tutorial” is the Arg_1. As it is said earlier, “” are used to group two words.

Let’s try another example for Tcl command with two arguments is given below. 


Puts stdout “TCL Command Tutorial”

On execution of the above code, the following results will be produced.

TCL Command Tutorial

In the above code, ‘puts’ is the Tcl_Cmd_Name, “stdout” is Arg_1 and “TCL Command Tutorial” is Arg_2. In this command, Stdout argument makes the program to print the Arg_2 to the standard output device.

Command substitution

In order substitutions, square sections are utilized to assess the scripts inside the square sections. A basic case to include two numbers is demonstrated as follows:


puts [expr 8 + 9 + 10]

On execution of the above code, following result is obtained.


Variable substitution

In variable substitutions, $ sign is used before the variable name. This sign returns the contents of the variable. A simple example, to set a value to a variable and print it, is given below.


set varA 10

puts $varA

Backslash substitution

Commonly, these are called as escape sequences with each backslash followed by a letter having its own significance and meaning. A simple example for newline substitution is shown below.


puts “TCL\n Command\n Tutorial”

Output would be




The primitive information kind of Tcl is string and frequently we can discover quotes on Tcl as string just dialect. These primitive information sorts thusly make composite information sorts for rundown and affiliated exhibit. In Tcl, information sorts can speak to basic Tcl objects, as well as can speak to complex articles like handles, realistic objects(mostly gadgets), and I/O channels.

Simple Tcl Objects

In Tcl command, whether it is a whole number, Boolean, gliding point number, or a string. When you need to utilize a variable, you can specifically dole out worth to it, there is no progression of presentation in Tcl. There can be inward representations for these distinctive sorts of items. It can change one information sort to another when required.

More Related Articles For You

    DBMS Tutorial

    SQL and DBMS Interview Questions with Answers

    DBMS and SQL Practice Tests , Questions and Quizzes

Shortcodes Ultimate

Follow Us