Insert data which has two forward slashes

{question}

Which column type should I define to be able to insert and display two forward slashes?

{question}

 

{answer}

You may choose any one of the following column types for inserting data which has two forward slashes: CHAR, VARCHAR, URL.

Please check the following example: 

SQL> create table test_str(name char(100), link varchar(100), url string);
SQL> insert into test_str values ('http://www.google.com', 'http://www.gmail.com', 'https://www.hdfcbank.com');
SQL> select * from test_str; NAME LINK URL
--------------------- -------------------- ------------------------ http://www.google.com http://www.gmail.com https://www.hdfcbank.com

 

More information about string types can be found here.

{answer}

Have more questions? Submit a request

Comments