পাইপ ক্যারেক্টার ইনসার্ট: কোনো সমস্যা নেই
MySQL-এ পাইপ (|) ক্যারেক্টার সাধারণ স্ট্রিং হিসেবে ইনসার্ট করা যায়। এটি কোনো স্পেশ্যাল মিনিং ধারণ করে না (রেগুলার এক্সপ্রেশন কনটেক্সট বাদে)।
উদাহরণ
টেবিল তৈরি
mysql> create table PipeInsertDemo (
-> UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> UserPassword varchar(100)
-> );
Query OK, 0 rows affected (0.52 sec)
পাইপ সহ ডেটা ইনসার্ট
mysql> insert into PipeInsertDemo(UserPassword) values('John123|');
Query OK, 1 row affected (0.15 sec)
mysql> insert into PipeInsertDemo(UserPassword) values('|123456CarolTaylor');
Query OK, 1 row affected (0.13 sec)
mysql> insert into PipeInsertDemo(UserPassword) values('Adam|345Smith');
Query OK, 1 row affected (0.20 sec)
ডেটা যাচাই
mysql> SELECT * FROM PipeInsertDemo;
আউটপুট
+--------+--------------------+ | UserId | UserPassword | +--------+--------------------+ | 1 | John123| | | 2 | |123456CarolTaylor | | 4 | Adam|345Smith | +--------+--------------------+
নোট: পাইপ ক্যারেক্টার শেল বা কমান্ড লাইনে পাইপলাইন হিসেবে ব্যাখ্যা হতে পারে। সেক্ষেত্রে কোটেশন মার্কস (সিঙ্গেল কোট) ব্যবহার করুন। MySQL ক্লায়েন্টে সরাসরি ইনসার্ট করলে কোনো সমস্যা নেই।