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;

Limit Characters in a Column with SQL TEXTSIZE

TEXTSIZE can limit the amount of data returned for the following data types: varchar(max)nvarchar(max)varbinary(max)textntextimage To set the TEXTSIZE use the following command: SET TEXTSIZE (number) So, if I were to

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

DevX - Software Development Resource

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