devxlogo

SQL

Turn on Line Numbers in SQL Developer

By default, line numbers are not turned on in SQL Developer. To turn them on, go to Tools ? Preferences: Click on the + next to Code Editor. Click on

Using the SQL LCASE Function

The LCASE() function simply converts the value of a field to lowercase. Syntax: SELECT LCASE(column_name) FROM table_name;

Using DATEFROMPARTS SQL Function

The DATEFROMPARTS function returns a date value with the date portion set to the specified year, month and day, and the time portion set to the default. An example follows:

Using REPLICATE for SQL Strings

The following example replicates a # character five times in front of a Student Number in the Students table: SELECT [Student Name], REPLICATE(‘#’, 5) + [Student Number] AS ‘Student Number’FROM

Check if a Temporary Table Exists

When working with dynamic SQL queries, you will encounter situations in which you will work with temporary tables. Knowing whether a temporary table exists or not is vital and can