Select For SQL, HTML and jQuery – POFTUT

Select For SQL, HTML and jQuery

Select is a very special term used in different programming languages, frameworks or database statements. In this tutorial we will list and explain different usages of the Select statements in SQL, HTML and jQuery.

SQL Select Statement

The most popular Select keyword is the SQL Select statement. SQL Select statement is used to query and retrieve data from and SQL database server. With the select statement the table the data is stored, the columns to be returned and some conditions about the retrieved data is provided to. A basic SQL select statement is like below.

Select * From Users;

Select Name, Surname From Users;

Select Name, Surname, Age From Users Where Age>20;

HTML <select> Tag

HTML also provides the <select> tag which is used to provides multiple option select menu where one of the options can be selected. This is very similar to the drop-down box.

<title>HTML Select Tag</title>

<h1>HTML Select Tag</h1>

<!-- The second value will be selected initially -->
<select name="choice">
<option value="first"></option>
<option value="second" selected></option>
<option value="third"></option>

HTML <select> Tag

jQuery Select() Function

jQuery is a very popular JavaScript framework that is mainly designed for client-side actions. jQuery also provides a function named select() which is used to bind an event handler for the given element or elements. The JavaScript code which will be executed when given element or elements selected.

$( “#target” ).select(function() {
   alert( “Handler for .select() called.” );

LEARN MORE  Most Useful SQL Commands List with Examples

Leave a Comment