SQLite quote() function
The quote(X) function returns a string which is the value of its argument suitable for inclusion into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed.
SQLite Version : 3.8.5
Example of SQLite quote() function
The following SQLite statement returns a string 'w3re' 'source'.
Here is the result.
quote('w3re''source') ------------------------------ 'w3re''source'
Example of SQLite quote() function using table
Sample table: departments
The following statement returns the department_name and department_name enclosed with a single quote for those departments whose department_id is larger than 100.
SELECT department_name, quote(department_name) FROM departments WHERE department_id>150;
Here is the result.
department_name quote(department_name) --------------- ---------------------- Marketing 'Marketing' Purchasing 'Purchasing' Human Resources 'Human Resources' Shipping 'Shipping' IT 'IT' Public Relation 'Public Relations' Sales 'Sales' Executive 'Executive' Benefits 'Benefits' Manufacturing 'Manufacturing' Construction 'Construction' Contracting 'Contracting' Operations 'Operations' IT Support 'IT Support' NOC 'NOC' IT Helpdesk 'IT Helpdesk' Government Sale 'Government Sales' Retail Sales 'Retail Sales' Recruiting 'Recruiting' Payroll 'Payroll'
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook