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.
#!/usr/bin/tclsh
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.
#!/usr/bin/tclsh
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:
#!/usr/bin/tclsh
puts [expr 8 + 9 + 10]
On execution of the above code, following result is obtained.
27
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.
#!/usr/bin/tclsh
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.
#!/usr/bin/tclsh
puts “TCL\n Command\n Tutorial”
Output would be
TCL
Command
Tutorial
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
- Architecture of DBMS
- CODDS RULE DBMS
- Database Models in DBMS
- Relational DBMS Concepts
- Keys and Types of keys in Database
- Database Normalization
- Generalization, Specialization and Aggregation Concepts in DBMS
- ERD Diagram Tutorial with Examples in DBMS
- Introduction to SQL
- How to Create Query in SQL, Create Table, Delete Table and User Insert Info Statements
- Alter Query Command in SQL, Add, Modify and Drop Column in Table
- Truncate Query, Drop and Rename Query in SQL
- All DML Statement in SQL, Select Statement, Delete, Insert and Update Statement
- Data Control Language DCL Revoke and Grant Command in SQL
- Select Statement or Select Query in SQL Explained with Examples
- Distinct Keyword Explained in SQL
- WHERE Statement or WHERE Clause in SQL Statement Explained
- AND & OR Operators in SQL
- LIKE Operator in SQL
- ORDER BY Clause Sorting Explained in SQL
- Group By Clause in SQL
- Having Clause Explained in SQL
- SQL Constraints
- SQL Aggregate Functions
- SQL Aliases Use and Purpose in SQL
- SQL Joins Types, Use and Purpose
- SQL Sequence Syntax and Use with Examples
- SQL View
- SET Operation in SQL, UNION, UNION ALL, Intersect and Minus