how to add index on text datatype

1 view
Skip to first unread message

Sanam Shrestha

unread,
Feb 5, 2013, 11:21:42 PM2/5/13
to phpgroup2...@googlegroups.com
code:

CREATE TABLE tbl_message(
message_id int not null auto_increment PRIMARY KEY,
sent_date_time DATETIME not null,
server_ip varchar(32) not null,
sender_name varchar(32) not null,
sender_email varchar(25),
sent_message text not null,
status tinyint(1) not null default 1,
department_id int not null,
INDEX (server_ip, sender_name, sender_email),
FOREIGN KEY (department_id)
REFERENCES tbl_department(department_id) ON UPDATE CASCADE ON DELETE RESTRICT
);
ALTER TABLE tbl_message
ADD INDEX (sent_message);


REPLY ME AS SOON AS POSSIBLE
sql.PNG
Reply all
Reply to author
Forward
0 new messages