SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Mar 23, 2002, 13:15 #1
- Join Date
- Dec 2001
- Location
- Midlands, UK
- Posts
- 284
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Converting basic MySQL design to MS SQL
Hi
I am a beginner and produced the following basic design of three tables in MySQL.
What I would like to do is simply to convert this design from MySQL to MS SQL using the appropriate relevant types. Can someone please suggest them for me please?
Any ideas?
Thanks.
Mak.
-------
PHP Code:
mysql> describe articles;
+----------------+--------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+------------+----------------+
| articleID | int(11) | | PRI | NULL | auto_increment |
| relAuthorID | int(11) | | | 0 | |
| relTopicID | int(11) | | | 0 | |
| articleTitle | varchar(200) | | | | |
| articleDate | date | | | 0000-00-00 | |
| articleContent | longtext | YES | | NULL | |
+----------------+--------------+------+-----+------------+----------------+
6 rows in set (0.02 sec)[list]
mysql> describe authors;
+-------------+-------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+------------+----------------+
| authorID | int(11) | | PRI | NULL | auto_increment |
| authorFname | varchar(50) | YES | | NULL | |
| authorSname | varchar(50) | YES | | NULL | |
| authorEmail | varchar(50) | YES | | NULL | |
| authorDate | date | | | 0000-00-00 | |
+-------------+-------------+------+-----+------------+----------------+
5 rows in set (0.00 sec)
mysql> describe topics;
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| topicID | int(11) | | PRI | NULL | auto_increment |
| topicTitle | varchar(200) | YES | | NULL | |
+------------+--------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
-
Mar 23, 2002, 20:32 #2
- Join Date
- Jul 2000
- Location
- Here
- Posts
- 1,010
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The type names are almost the same. MS SQL Server has int, varchar, text, and more. From SQL Server's Enterprise Manager you can easily add columns and select the type you need. You shouldn't have any problems in choosing the right data types for the columns you listed.
(That paragraph is kind of short and choppy, but so are the ideas. I know it sounds goofy)
-
Mar 24, 2002, 19:01 #3
- Join Date
- Dec 2001
- Location
- Midlands, UK
- Posts
- 284
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
but...
Hi
So in this case, what would I use for articleContent (the text of an article). What is a direct substitute for 'longtext' which allows 2GBs (I think.. or some large amount).
Thanks.
Mak.
Bookmarks