Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gds
Starting Member
29 Posts |
Posted - 2001-04-17 : 02:26:23
|
| GOOD DAY TO ALL SQL-SEVER SYS-ADMIN.I'm using SQL server 2000, which is more efficient varchar or char data types in table fields.Scenario: CREATE TABLE table1 ( name1 char(10), name2 varchar(10) )Supposing I have this insert statement: INSERT table VALUES ('gds','gds');Then when I try to retrieve records in this table and stored it in recordset in VB 6.0I found out that the value of name1 is 'gds ' and name2 = 'gds'Whenever I compare into a value I have to trim first the field in the recordset.So which is more efficient in table fields varchar or char |
|
|
|
|
|