I am trying to use codeigniter and MS-SQL. I have to use ci_sessions table to automatically store the sessions in the mssql server. The codeigniter have provided the ci_sessions table sql in user-guide as below:
CREATE TABLE IF NOT EXISTS `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(120) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id),
KEY `last_activity_idx` (`last_activity`)
);
. Here, I have to create the same table in MS SQL Server. What can be corresponding sql for MS SQL SERVER and also for below captcha sql table:
CREATE TABLE captcha (
captcha_id bigint(13) unsigned NOT NULL auto_increment,
captcha_time int(10) unsigned NOT NULL,
ip_address varchar(16) default '0' NOT NULL,
word varchar(20) NOT NULL,
PRIMARY KEY `captcha_id` (`captcha_id`),
KEY `word` (`word`)
);
How to create same table of above mysql query in MS SQL SERVER using sql query