CREATE TABLE user_session {
"id"SERIAL PRIMARY KEY NOT NULL
}
what i dont understand is what does it mean by SERIAL PRIMARY KEY? so, what kind of datatype use for id?
Serial used to be an alias for an auto incrementing BIGINT field. It's a Postgresql feature that MySQL added for compatibility. It's not mentioned in the MySQL manual any more though so I guess it's been dropped.
can u give me some example bcoz i never use postgresql before... from wut i notice, the command to connect to table is using pg_connect,pg_query and etc which i believed stand for postgresql... so how can i change it so that i can be used in normal mysql?
cashflowtips wrote:can u give me some example bcoz i never use postgresql before... from wut i notice, the command to connect to table is using pg_connect,pg_query and etc which i believed stand for postgresql... so how can i change it so that i can be used in normal mysql?
MySQL and Postgresql are two entirely different database engines, with their own variations of SQL language. Don't mix them up! Use one or the other!