Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2006
    Posts
    83

    Thumbs down Unanswered: USING BTREE in MSSQL Server

    Please tell me the equivalent of the below MySQL query in MSSQL Server .

    CREATE TABLE temp (
    tempvar1 varchar(12) NOT NULL default ''
    ,
    KEY Firstkey USING BTREE(tempvar1)
    )

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Some will know MySQL syntax and some won't. I am of the former.

    What does that translate to in English?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Oct 2006
    Posts
    83
    I am new to databases . I know only basic syntaxes . I came across this one which is confusing. In MySQL its working fine, but don't know what the difference it makes .
    Please tell me the equivalent in SQL Server

  4. #4
    Join Date
    Oct 2006
    Posts
    83
    Please refer
    http://www.dbforums.com/showthread.php?t=1617755
    for details about USING BTREE

  5. #5
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Are you simply trying to add a primary key to the table?

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    http://www.dbforums.com/showthread.php?t=1617759

    Seriously - you would do much better if you help us out. This is a SQL Server forum. Most of us have a decent idea of SQL Server syntax but not all understand MySQL. If you can translate the MySQL into English we can help you much more quickly (if it is possible at all).

    BTW - sorry but I don't have time to follow links. If you can summarise the relevent details then I will do my best.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by pootle flump
    sorry but I don't have time to follow links. If you can summarise the relevent details then I will do my best.
    Spoken like a true pro/noob
    George
    Home | Blog

  8. #8
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Quote Originally Posted by krReddy
    Please tell me the equivalent of the below MySQL query in MSSQL Server .

    CREATE TABLE temp (
    tempvar1 varchar(12) NOT NULL default ''
    ,
    KEY Firstkey USING BTREE(tempvar1)
    )
    SQL Server does not allow you to tell the engine what style index structure to maintain for your table indicies. Here is an example of creating a temp table with a primary key:

    Code:
     
     
    create table #temp (
    col1 int, 
    col2 varchar(20)
    CONSTRAINT PK_temp PRIMARY KEY  (col1))

    -- This is all just a Figment of my Imagination --

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •