以下是sqlserver的建表语句请问如何分别转成mysql和oracle的语句:
create table users
(
uId int identity(1,1) not null primary key,
uName varchar(20) not null,
uPass varchar(20) not null,
head varchar(20) not null,
regTime dateTime not null,
gender smallint not null,
uPoint int not null,
uGrade int not null,
isAdmin smallint not null
); 

解决方案 »

  1.   

    MYSQL
    create table users
    (
    uId int auto_increment primary key,
    uName varchar(20) not null,
    uPass varchar(20) not null,
    head varchar(20) not null,
    regTime dateTime not null,
    gender int not null,
    uPoint int not null,
    uGrade int not null,
    isAdmin int not null
    ); 
      

  2.   

    谢谢~
    但oracle的语句是怎么样的啊?
      

  3.   

    oracle 到 oracle 版去问吧。
      

  4.   

    可以用Sybase PowerDesiner迁移.
      

  5.   

    SQL> create table users
      2  (
      3    userid int PRIMARY KEY,
      4    uName varchar2(20) not null,
      5    uPass varchar2(20) not null,
      6    head varchar2(20) not null,
      7    regTime date not null,
      8    gender int not null,
      9    uPoint int not null,
     10    uGrade int not null,
     11    isAdmin int not null
     12  );表已创建。SQL>
    注意,UID为ORACLE保留关键字,所以不能用它做列名
    另外SQL SERVER里的自增长列在ORACLE里没有,需要创建一个序列,然后通过程序或触发器实现。