IT Community - Software Programming, Web Development and Technical Support

Escape Character in MySql

This is a discussion on Escape Character in MySql within the Database Support forums, part of the Web Development category; hi... Can anyone give details about "escape character" in MySql ?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-12-2007, 12:18 AM
raj raj is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 89
raj is on a distinguished road
Default Escape Character in MySql

hi...

Can anyone give details about "escape character" in MySql ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-12-2007, 03:16 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Escape Character in MySql

Hi,

Escape Character,Yes available in MYSQL as same as Oracle.

Here are some examples.

1. SELECT "Its \n really \n working";

This will list the values as every character in new line

Output:

Its
really
working


2. SELECT "P.R & Sons";
Will List the Value with the Ambersent

3. SELECT "This is Mayor's Book";
Will List the Value with the single quote.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-12-2007, 06:11 AM
raj raj is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 89
raj is on a distinguished road
Default Escape Character in MySql

Hi murali,

thanks for your reply....


i want to search a string from a table:

search string: hell\%test

how do u make query for this?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-12-2007, 06:24 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: Escape Character in MySql

Hi buddy,

-- For mysql
SELECT * FROM test WHERE name LIKE '%hell\\\%test%';

-- For oracle
SELECT * FROM TEST WHERE NAME LIKE '%hell\\%test%' ESCAPE '\';
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2007, 09:53 PM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Escape Character in MySql

Hi Raj,

Hope Got answer for your question.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-12-2007, 10:07 PM
raj raj is offline
D-Web Programmer
 
Join Date: Jul 2007
Posts: 89
raj is on a distinguished road
Default Escape Character in MySql

Hi,

thanks its working...

Can you give, other escape characters?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-13-2007, 04:27 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: Escape Character in MySql

May be these links help u to know about Escape Characters.

Escape Characters

Oracle Wildcards Wildcard Characters Escape Character

How to Escape Characters in Oracle PL/SQL Queries My Digital Life
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/1607-escape-character-mysql.html
Posted By For Type Date
에서 문자를 이스케이프하는 방법 oracle 1 / sql 쿼리»내 디지털 라이프 This thread Refback 03-20-2008 09:56 PM
Как избежать символов в Oracle PL / SQL запросов »Моя Цифровая жизнь This thread Refback 02-08-2008 02:54 AM
Cómo escapar caracteres en Oracle PL/SQL pregunta” mi vida de Digital This thread Refback 09-20-2007 09:33 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide to Character Encoding in HTML / PHP / MySQL ??? bordeauxkevin PHP Programming 0 12-29-2008 08:50 AM
What is the wildcard character in SQL? S.Vinothkumar Database Support 3 04-10-2008 10:50 PM
How to get ASCII Value of a first character in a string in php? $enthil PHP Programming 1 01-06-2008 10:48 PM
MySQL supports indian language character sets priyan Database Support 16 12-12-2007 03:40 AM
Character Embedding geoblow Flash Actionscript Programming 0 09-18-2007 12:11 AM


All times are GMT -7. The time now is 02:33 PM.


Copyright 2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
Miami FL Divorce Lawyers      Pittsburgh Personal Injury Law      Austin TX Auto Accident Lawyer
Sedo - Buy and Sell Domain Names and Websites project info: discussweb.com Statistics for project discussweb.com etracker web controlling instead of log file analysis

SEO by vBSEO 3.0.0