Comments

Use comments to attach explanatory text to SQL statements or statement blocks. The database server does not execute comments.

Several comment indicators are available in Sybase IQ:

NoteThe double-hyphen and the slash-asterisk comment styles are compatible with Adaptive Server Enterprise.

Examples

CREATE FUNCTION fullname (firstname CHAR(30), 
			lastname CHAR(30))
RETURNS CHAR(61)
-- fullname concatenates the firstname and lastname
-- arguments with a single space between.
BEGIN
	DECLARE name CHAR(61);
	SET name = firstname || ' ' || lastname;
	RETURN ( name );
END


/*
	Lists the names and employee IDs of employees
	who work in the sales department.
*/
CREATE VIEW SalesEmployee AS
SELECT emp_id, emp_lname, emp_fname
FROM "GROUPO".Employees
WHERE DepartmentID = 200