Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
SQL Category Code
Real Name
:
SharingCode.NET User
Subject
:
rpad string function PostgreSQL
Description
:
rpad string function PostgreSQL / PostgreSQL de rpad fonksiyonu ...
postgres=# select * from employee; id | name | salary | start_date | city | region ----+--------+--------+------------+-----------+-------- 1 | Jason | 40420 | 1994-02-01 | New York | W 2 | Robert | 14420 | 1995-01-02 | Vancouver | N 3 | Celia | 24020 | 1996-12-03 | Toronto | W 4 | Linda | 40620 | 1997-11-04 | New York | N 5 | David | 80026 | 1998-10-05 | Vancouver | W 6 | James | 70060 | 1999-09-06 | Toronto | N 7 | Alison | 90620 | 2000-08-07 | New York | W 8 | Chris | 26020 | 2001-07-08 | Vancouver | N 9 | Mary | 60020 | 2002-06-09 | Toronto | W (9 rows) postgres=# postgres=# SELECT name, rpad(name, 12, '-') AS right_dashed, postgres-# rpad(name, 12, '-+-') AS right_plus_dashed postgres-# FROM employee; name | right_dashed | right_plus_dashed --------+--------------+------------------- Jason | Jason------- | Jason-+--+-- Robert | Robert------ | Robert-+--+- Celia | Celia------- | Celia-+--+-- Linda | Linda------- | Linda-+--+-- David | David------- | David-+--+-- James | James------- | James-+--+-- Alison | Alison------ | Alison-+--+- Chris | Chris------- | Chris-+--+-- Mary | Mary-------- | Mary-+--+--+ (9 rows)
Rating
:
0.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks