How to pad with leading zeros an int or smallint in sybase?



How to pad with leading zeros an int or smallint in sybase?..

Answer / Majid Ali Khan

To pad an INT or SMALLINT column with leading zeros in Sybase, you can use the RIGHT() and LPAD() functions.nFor example:nnCREATE TABLE MyTable (MyCol INT);nINSERT INTO MyTable VALUES (123);nUPDATE MyTable SET MyCol = RIGHT('000' + CAST(MyCol AS VARCHAR), 4);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Sybase Interview Questions

what is the architechure of sybase ASE?

2 Answers   ocbc,


What is cis and how can I use it?

1 Answers  


List different types of locks in sybase?

1 Answers  


How do you use workspace in sybase?

1 Answers  


What is asa ultralite in sybase?

1 Answers  


How does sybase replication work?

1 Answers  


What is sybase infomaker?

1 Answers  


How do you check database space?

1 Answers  


What is isql in sybase?

1 Answers  


In sybase, we can have multiple users associated to same login ,each corresponds to different databases, right? how can we login to one database with corresponding user id?

3 Answers   ISRO,


can i gat any proper material for sybase if possible plz let me know balaji.cc1@gmail.com

2 Answers  


Explain about the features of sybase iq?

1 Answers  


Categories