TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

SQLite Expressions

SQLite Expressions with history, features, advantages, installation, commands, syntax, datatypes, operators, expressions, databases, table, crud operations, clauses, like, glob, limit, and clause, advance sqlite

<< Back to SQLITE

SQLite Expressions

SQLite Expressions are the combination of one or more values, operators and SQL functions. These expressions are used to evaluate a value.

SQLite expressions are written in query language and used with SELECT statement.

Syntax:

SELECT column1, column2, columnN 
FROM table_name 
WHERE [CONDITION | EXPRESSION]; 

There are mainly three types of SQLite expressions:


1) SQLite Boolean Expression

SQLite Boolean expressions are used to fetch the data on the basis of matching single value.

Syntax:

SELECT column1, column2, columnN 
FROM table_name 
WHERE SINGLE VALUE MATCHTING EXPRESSION; 

Example:

We have an existing table named "STUDENT", having the following data:

Sqlite Expressions 1

See this simple example of SQLite Boolean expression.

SELECT * FROM STUDENT WHERE FEES = 20000; 

Output:

Sqlite Expressions 2

2) SQLite Numeric Expressions

SQLite Numeric expression is used to perform any mathematical operations in the query.

Syntax:

SELECT numerical_expression as  OPERATION_NAME
[FROM table_name WHERE CONDITION] ; 

Example1:

SELECT (25 + 15) AS ADDITION;

Output:

Sqlite Expressions 3

Numeric expressions contain several built-in functions like avg(), sum(), count(), etc. These functions are known as aggregate data calculation functions.

SELECT COUNT(*) AS "RECORDS" FROM STUDENT;

Output:

Sqlite Expressions 4

3) SQlite Date Expression

SQlite Date expressions are used to fetch the current system date and time values.

Syntax:

SELECT CURRENT_TIMESTAMP; 

SELECT CURRENT_TIMESTAMP;

Output:

Sqlite Expressions 5




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf